From e04e87361f784e41bbd1548ba442b46a541f3329 Mon Sep 17 00:00:00 2001 From: Kraig Amador Date: Wed, 4 May 2016 18:06:27 -0700 Subject: [PATCH 1/2] vendor: Updated github.com/aws/aws-sdk-go to v1.1.23 The new STS library includes GetCallerIdentity which can be used to build ARNs for RDS resources when using IAM roles --- Godeps/Godeps.json | 237 +- .../aws-sdk-go/aws/client/default_retryer.go | 26 +- .../github.com/aws/aws-sdk-go/aws/config.go | 47 + .../aws-sdk-go/aws/corehandlers/handlers.go | 48 +- .../aws/corehandlers/param_validator.go | 148 +- .../aws-sdk-go/aws/request/http_request.go | 26 + .../aws/request/http_request_1_4.go | 24 + .../aws/aws-sdk-go/aws/request/request.go | 31 +- .../aws/aws-sdk-go/aws/request/validation.go | 234 ++ .../aws/aws-sdk-go/aws/session/session.go | 2 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../private/protocol/json/jsonutil/build.go | 7 +- .../aws/aws-sdk-go/private/signer/v4/v4.go | 47 +- .../aws/aws-sdk-go/service/apigateway/api.go | 1415 ++++++- .../aws/aws-sdk-go/service/autoscaling/api.go | 876 +++++ .../aws-sdk-go/service/cloudformation/api.go | 422 +++ .../aws/aws-sdk-go/service/cloudfront/api.go | 971 +++++ .../aws/aws-sdk-go/service/cloudtrail/api.go | 193 + .../aws/aws-sdk-go/service/cloudwatch/api.go | 390 ++ .../service/cloudwatchevents/api.go | 252 ++ .../aws-sdk-go/service/cloudwatchlogs/api.go | 631 ++++ .../aws/aws-sdk-go/service/codecommit/api.go | 236 ++ .../aws/aws-sdk-go/service/codedeploy/api.go | 503 +++ .../service/directoryservice/api.go | 838 +++++ .../aws/aws-sdk-go/service/dynamodb/api.go | 673 ++++ .../aws/aws-sdk-go/service/ec2/api.go | 3260 ++++++++++++++++- .../aws/aws-sdk-go/service/ec2/waiters.go | 4 +- .../aws/aws-sdk-go/service/ecr/api.go | 310 +- .../aws/aws-sdk-go/service/ecs/api.go | 334 ++ .../aws/aws-sdk-go/service/efs/api.go | 191 + .../aws/aws-sdk-go/service/elasticache/api.go | 402 ++ .../service/elasticbeanstalk/api.go | 1134 +++++- .../service/elasticbeanstalk/service.go | 14 +- .../service/elasticsearchservice/api.go | 168 + .../aws/aws-sdk-go/service/elb/api.go | 662 ++++ .../aws/aws-sdk-go/service/firehose/api.go | 910 ++++- .../aws-sdk-go/service/firehose/service.go | 3 +- .../aws/aws-sdk-go/service/glacier/api.go | 511 +++ .../service/glacier/customizations.go | 14 +- .../aws/aws-sdk-go/service/iam/api.go | 2213 +++++++++++ .../aws/aws-sdk-go/service/kinesis/api.go | 895 ++++- .../aws/aws-sdk-go/service/kinesis/service.go | 4 +- .../aws/aws-sdk-go/service/kms/api.go | 571 ++- .../aws/aws-sdk-go/service/lambda/api.go | 534 +++ .../aws/aws-sdk-go/service/opsworks/api.go | 922 ++++- .../aws/aws-sdk-go/service/rds/api.go | 1334 +++++++ .../aws/aws-sdk-go/service/redshift/api.go | 675 ++++ .../aws/aws-sdk-go/service/route53/api.go | 1103 +++++- .../aws/aws-sdk-go/service/s3/api.go | 1661 +++++++++ .../aws-sdk-go/service/s3/customizations.go | 57 +- .../service/s3/host_style_bucket.go | 165 +- .../service/s3/platform_handlers.go | 8 + .../service/s3/platform_handlers_go1.6.go | 28 + .../aws/aws-sdk-go/service/sns/api.go | 350 ++ .../aws/aws-sdk-go/service/sqs/api.go | 357 ++ .../aws/aws-sdk-go/service/sts/api.go | 1478 ++++++++ .../aws-sdk-go/service/sts/customizations.go | 12 + .../aws/aws-sdk-go/service/sts/service.go | 130 + 58 files changed, 27883 insertions(+), 810 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/http_request_1_4.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/validation.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sts/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sts/service.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 39346dc3d..280b788a6 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -227,293 +227,298 @@ }, { "ImportPath": "github.com/aws/aws-sdk-go/aws", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/awserr", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/awsutil", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/client", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/client/metadata", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/corehandlers", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/defaults", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/request", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/session", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/waiter", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/apigateway", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/cloudformation", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/cloudfront", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/cloudtrail", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/codecommit", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/codedeploy", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/directoryservice", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/dynamodb", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ec2", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ecr", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ecs", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/efs", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elasticache", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elb", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/firehose", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/glacier", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/iam", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/kinesis", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/kms", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/lambda", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/opsworks", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/rds", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/redshift", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/route53", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/s3", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/sns", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/sqs", - "Comment": "v1.1.15", - "Rev": "e7cf1e5986499eea7d4a87868f1eb578c8f2045a" + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" + }, + { + "ImportPath": "github.com/aws/aws-sdk-go/service/sts", + "Comment": "v1.1.23", + "Rev": "2cc71659118a868dc7544a7ef0808eb42d487011" }, { "ImportPath": "github.com/bgentry/speakeasy", diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go index f664caf09..43a3676b7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go @@ -2,6 +2,7 @@ package client import ( "math/rand" + "sync" "time" "github.com/aws/aws-sdk-go/aws/request" @@ -29,13 +30,15 @@ func (d DefaultRetryer) MaxRetries() int { return d.NumMaxRetries } +var seededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())}) + // RetryRules returns the delay duration before retrying this request again func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { // Set the upper limit of delay in retrying at ~five minutes minTime := 30 throttle := d.shouldThrottle(r) if throttle { - minTime = 1000 + minTime = 500 } retryCount := r.RetryCount @@ -45,7 +48,7 @@ func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { retryCount = 8 } - delay := (1 << uint(retryCount)) * (rand.Intn(30) + minTime) + delay := (1 << uint(retryCount)) * (seededRand.Intn(minTime) + minTime) return time.Duration(delay) * time.Millisecond } @@ -66,3 +69,22 @@ func (d DefaultRetryer) shouldThrottle(r *request.Request) bool { } return r.IsErrorThrottle() } + +// lockedSource is a thread-safe implementation of rand.Source +type lockedSource struct { + lk sync.Mutex + src rand.Source +} + +func (r *lockedSource) Int63() (n int64) { + r.lk.Lock() + n = r.src.Int63() + r.lk.Unlock() + return +} + +func (r *lockedSource) Seed(seed int64) { + r.lk.Lock() + r.src.Seed(seed) + r.lk.Unlock() +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index 9e83e9260..bfaa15203 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -100,6 +100,31 @@ type Config struct { // Amazon S3: Virtual Hosting of Buckets S3ForcePathStyle *bool + // Set this to `true` to disable the SDK adding the `Expect: 100-Continue` + // header to PUT requests over 2MB of content. 100-Continue instructs the + // HTTP client not to send the body until the service responds with a + // `continue` status. This is useful to prevent sending the request body + // until after the request is authenticated, and validated. + // + // http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html + // + // 100-Continue is only enabled for Go 1.6 and above. See `http.Transport`'s + // `ExpectContinueTimeout` for information on adjusting the continue wait timeout. + // https://golang.org/pkg/net/http/#Transport + // + // You should use this flag to disble 100-Continue if you experiance issues + // with proxies or thrid party S3 compatible services. + S3Disable100Continue *bool + + // Set this to `true` to enable S3 Accelerate feature. For all operations compatible + // with S3 Accelerate will use the accelerate endpoint for requests. Requests not compatible + // will fall back to normal S3 requests. + // + // The bucket must be enable for accelerate to be used with S3 client with accelerate + // enabled. If the bucket is not enabled for accelerate an error will be returned. + // The bucket name must be DNS compatible to also work with accelerate. + S3UseAccelerate *bool + // Set this to `true` to disable the EC2Metadata client from overriding the // default http.Client's Timeout. This is helpful if you do not want the EC2Metadata // client to create a new http.Client. This options is only meaningful if you're not @@ -210,6 +235,20 @@ func (c *Config) WithS3ForcePathStyle(force bool) *Config { return c } +// WithS3Disable100Continue sets a config S3Disable100Continue value returning +// a Config pointer for chaining. +func (c *Config) WithS3Disable100Continue(disable bool) *Config { + c.S3Disable100Continue = &disable + return c +} + +// WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config +// pointer for chaining. +func (c *Config) WithS3UseAccelerate(enable bool) *Config { + c.S3UseAccelerate = &enable + return c +} + // WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value // returning a Config pointer for chaining. func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config { @@ -288,6 +327,14 @@ func mergeInConfig(dst *Config, other *Config) { dst.S3ForcePathStyle = other.S3ForcePathStyle } + if other.S3Disable100Continue != nil { + dst.S3Disable100Continue = other.S3Disable100Continue + } + + if other.S3UseAccelerate != nil { + dst.S3UseAccelerate = other.S3UseAccelerate + } + if other.EC2MetadataDisableTimeoutOverride != nil { dst.EC2MetadataDisableTimeoutOverride = other.EC2MetadataDisableTimeoutOverride } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index a054d3934..8456e29b5 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -24,30 +24,38 @@ type lener interface { // BuildContentLengthHandler builds the content length of a request based on the body, // or will use the HTTPRequest.Header's "Content-Length" if defined. If unable // to determine request body length and no "Content-Length" was specified it will panic. +// +// The Content-Length will only be aded to the request if the length of the body +// is greater than 0. If the body is empty or the current `Content-Length` +// header is <= 0, the header will also be stripped. var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) { - if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" { - length, _ := strconv.ParseInt(slength, 10, 64) - r.HTTPRequest.ContentLength = length - return - } - var length int64 - switch body := r.Body.(type) { - case nil: - length = 0 - case lener: - length = int64(body.Len()) - case io.Seeker: - r.BodyStart, _ = body.Seek(0, 1) - end, _ := body.Seek(0, 2) - body.Seek(r.BodyStart, 0) // make sure to seek back to original location - length = end - r.BodyStart - default: - panic("Cannot get length of body, must provide `ContentLength`") + + if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" { + length, _ = strconv.ParseInt(slength, 10, 64) + } else { + switch body := r.Body.(type) { + case nil: + length = 0 + case lener: + length = int64(body.Len()) + case io.Seeker: + r.BodyStart, _ = body.Seek(0, 1) + end, _ := body.Seek(0, 2) + body.Seek(r.BodyStart, 0) // make sure to seek back to original location + length = end - r.BodyStart + default: + panic("Cannot get length of body, must provide `ContentLength`") + } } - r.HTTPRequest.ContentLength = length - r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length)) + if length > 0 { + r.HTTPRequest.ContentLength = length + r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length)) + } else { + r.HTTPRequest.ContentLength = 0 + r.HTTPRequest.Header.Del("Content-Length") + } }} // SDKVersionUserAgentHandler is a request handler for adding the SDK Version to the user agent. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go index ea07580a9..7d50b1557 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go @@ -1,153 +1,17 @@ package corehandlers -import ( - "fmt" - "reflect" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) +import "github.com/aws/aws-sdk-go/aws/request" // ValidateParametersHandler is a request handler to validate the input parameters. // Validating parameters only has meaning if done prior to the request being sent. var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) { - if r.ParamsFilled() { - v := validator{errors: []string{}} - v.validateAny(reflect.ValueOf(r.Params), "") - - if count := len(v.errors); count > 0 { - format := "%d validation errors:\n- %s" - msg := fmt.Sprintf(format, count, strings.Join(v.errors, "\n- ")) - r.Error = awserr.New("InvalidParameter", msg, nil) - } - } -}} - -// A validator validates values. Collects validations errors which occurs. -type validator struct { - errors []string -} - -// There's no validation to be done on the contents of []byte values. Prepare -// to check validateAny arguments against that type so we can quickly skip -// them. -var byteSliceType = reflect.TypeOf([]byte(nil)) - -// validateAny will validate any struct, slice or map type. All validations -// are also performed recursively for nested types. -func (v *validator) validateAny(value reflect.Value, path string) { - value = reflect.Indirect(value) - if !value.IsValid() { + if !r.ParamsFilled() { return } - switch value.Kind() { - case reflect.Struct: - v.validateStruct(value, path) - case reflect.Slice: - if value.Type() == byteSliceType { - // We don't need to validate the contents of []byte. - return - } - for i := 0; i < value.Len(); i++ { - v.validateAny(value.Index(i), path+fmt.Sprintf("[%d]", i)) - } - case reflect.Map: - for _, n := range value.MapKeys() { - v.validateAny(value.MapIndex(n), path+fmt.Sprintf("[%q]", n.String())) + if v, ok := r.Params.(request.Validator); ok { + if err := v.Validate(); err != nil { + r.Error = err } } -} - -// validateStruct will validate the struct value's fields. If the structure has -// nested types those types will be validated also. -func (v *validator) validateStruct(value reflect.Value, path string) { - prefix := "." - if path == "" { - prefix = "" - } - - for i := 0; i < value.Type().NumField(); i++ { - f := value.Type().Field(i) - if strings.ToLower(f.Name[0:1]) == f.Name[0:1] { - continue - } - fvalue := value.FieldByName(f.Name) - - err := validateField(f, fvalue, validateFieldRequired, validateFieldMin) - if err != nil { - v.errors = append(v.errors, fmt.Sprintf("%s: %s", err.Error(), path+prefix+f.Name)) - continue - } - - v.validateAny(fvalue, path+prefix+f.Name) - } -} - -type validatorFunc func(f reflect.StructField, fvalue reflect.Value) error - -func validateField(f reflect.StructField, fvalue reflect.Value, funcs ...validatorFunc) error { - for _, fn := range funcs { - if err := fn(f, fvalue); err != nil { - return err - } - } - return nil -} - -// Validates that a field has a valid value provided for required fields. -func validateFieldRequired(f reflect.StructField, fvalue reflect.Value) error { - if f.Tag.Get("required") == "" { - return nil - } - - switch fvalue.Kind() { - case reflect.Ptr, reflect.Slice, reflect.Map: - if fvalue.IsNil() { - return fmt.Errorf("missing required parameter") - } - default: - if !fvalue.IsValid() { - return fmt.Errorf("missing required parameter") - } - } - return nil -} - -// Validates that if a value is provided for a field, that value must be at -// least a minimum length. -func validateFieldMin(f reflect.StructField, fvalue reflect.Value) error { - minStr := f.Tag.Get("min") - if minStr == "" { - return nil - } - min, _ := strconv.ParseInt(minStr, 10, 64) - - kind := fvalue.Kind() - if kind == reflect.Ptr { - if fvalue.IsNil() { - return nil - } - fvalue = fvalue.Elem() - } - - switch fvalue.Kind() { - case reflect.String: - if int64(fvalue.Len()) < min { - return fmt.Errorf("field too short, minimum length %d", min) - } - case reflect.Slice, reflect.Map: - if fvalue.IsNil() { - return nil - } - if int64(fvalue.Len()) < min { - return fmt.Errorf("field too short, minimum length %d", min) - } - - // TODO min can also apply to number minimum value. - - } - return nil -} +}} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go new file mode 100644 index 000000000..3127762f4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go @@ -0,0 +1,26 @@ +// +build go1.5 + +package request + +import ( + "io" + "net/http" +) + +func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request { + return &http.Request{ + URL: r.URL, + Header: r.Header, + Close: r.Close, + Form: r.Form, + PostForm: r.PostForm, + Body: body, + MultipartForm: r.MultipartForm, + Host: r.Host, + Method: r.Method, + Proto: r.Proto, + ContentLength: r.ContentLength, + // Cancel will be deprecated in 1.7 and will be replaced with Context + Cancel: r.Cancel, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/http_request_1_4.go b/vendor/github.com/aws/aws-sdk-go/aws/request/http_request_1_4.go new file mode 100644 index 000000000..86c9c2f77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/http_request_1_4.go @@ -0,0 +1,24 @@ +// +build !go1.5 + +package request + +import ( + "io" + "net/http" +) + +func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request { + return &http.Request{ + URL: r.URL, + Header: r.Header, + Close: r.Close, + Form: r.Form, + PostForm: r.PostForm, + Body: body, + MultipartForm: r.MultipartForm, + Host: r.Host, + Method: r.Method, + Proto: r.Proto, + ContentLength: r.ContentLength, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index a4b70545a..2391632f1 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -221,6 +221,13 @@ func (r *Request) Sign() error { // // Send will sign the request prior to sending. All Send Handlers will // be executed in the order they were set. +// +// Canceling a request is non-deterministic. If a request has been canceled, +// then the transport will choose, randomly, one of the state channels during +// reads or getting the connection. +// +// readLoop() and getConn(req *Request, cm connectMethod) +// https://github.com/golang/go/blob/master/src/net/http/transport.go func (r *Request) Send() error { for { if aws.BoolValue(r.Retryable) { @@ -240,22 +247,12 @@ func (r *Request) Send() error { body = ioutil.NopCloser(r.Body) } - r.HTTPRequest = &http.Request{ - URL: r.HTTPRequest.URL, - Header: r.HTTPRequest.Header, - Close: r.HTTPRequest.Close, - Form: r.HTTPRequest.Form, - PostForm: r.HTTPRequest.PostForm, - Body: body, - MultipartForm: r.HTTPRequest.MultipartForm, - Host: r.HTTPRequest.Host, - Method: r.HTTPRequest.Method, - Proto: r.HTTPRequest.Proto, - ContentLength: r.HTTPRequest.ContentLength, + r.HTTPRequest = copyHTTPRequest(r.HTTPRequest, body) + if r.HTTPResponse != nil && r.HTTPResponse.Body != nil { + // Closing response body. Since we are setting a new request to send off, this + // response will get squashed and leaked. + r.HTTPResponse.Body.Close() } - // Closing response body. Since we are setting a new request to send off, this - // response will get squashed and leaked. - r.HTTPResponse.Body.Close() } r.Sign() @@ -267,6 +264,10 @@ func (r *Request) Send() error { r.Handlers.Send.Run(r) if r.Error != nil { + if strings.Contains(r.Error.Error(), "net/http: request canceled") { + return r.Error + } + err := r.Error r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go new file mode 100644 index 000000000..2520286b7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go @@ -0,0 +1,234 @@ +package request + +import ( + "bytes" + "fmt" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +const ( + // InvalidParameterErrCode is the error code for invalid parameters errors + InvalidParameterErrCode = "InvalidParameter" + // ParamRequiredErrCode is the error code for required parameter errors + ParamRequiredErrCode = "ParamRequiredError" + // ParamMinValueErrCode is the error code for fields with too low of a + // number value. + ParamMinValueErrCode = "ParamMinValueError" + // ParamMinLenErrCode is the error code for fields without enough elements. + ParamMinLenErrCode = "ParamMinLenError" +) + +// Validator provides a way for types to perform validation logic on their +// input values that external code can use to determine if a type's values +// are valid. +type Validator interface { + Validate() error +} + +// An ErrInvalidParams provides wrapping of invalid parameter errors found when +// validating API operation input parameters. +type ErrInvalidParams struct { + // Context is the base context of the invalid parameter group. + Context string + errs []ErrInvalidParam +} + +// Add adds a new invalid parameter error to the collection of invalid +// parameters. The context of the invalid parameter will be updated to reflect +// this collection. +func (e *ErrInvalidParams) Add(err ErrInvalidParam) { + err.SetContext(e.Context) + e.errs = append(e.errs, err) +} + +// AddNested adds the invalid parameter errors from another ErrInvalidParams +// value into this collection. The nested errors will have their nested context +// updated and base context to reflect the merging. +// +// Use for nested validations errors. +func (e *ErrInvalidParams) AddNested(nestedCtx string, nested ErrInvalidParams) { + for _, err := range nested.errs { + err.SetContext(e.Context) + err.AddNestedContext(nestedCtx) + e.errs = append(e.errs, err) + } +} + +// Len returns the number of invalid parameter errors +func (e ErrInvalidParams) Len() int { + return len(e.errs) +} + +// Code returns the code of the error +func (e ErrInvalidParams) Code() string { + return InvalidParameterErrCode +} + +// Message returns the message of the error +func (e ErrInvalidParams) Message() string { + return fmt.Sprintf("%d validation error(s) found.", len(e.errs)) +} + +// Error returns the string formatted form of the invalid parameters. +func (e ErrInvalidParams) Error() string { + w := &bytes.Buffer{} + fmt.Fprintf(w, "%s: %s\n", e.Code(), e.Message()) + + for _, err := range e.errs { + fmt.Fprintf(w, "- %s\n", err.Message()) + } + + return w.String() +} + +// OrigErr returns the invalid parameters as a awserr.BatchedErrors value +func (e ErrInvalidParams) OrigErr() error { + return awserr.NewBatchError( + InvalidParameterErrCode, e.Message(), e.OrigErrs()) +} + +// OrigErrs returns a slice of the invalid parameters +func (e ErrInvalidParams) OrigErrs() []error { + errs := make([]error, len(e.errs)) + for i := 0; i < len(errs); i++ { + errs[i] = e.errs[i] + } + + return errs +} + +// An ErrInvalidParam represents an invalid parameter error type. +type ErrInvalidParam interface { + awserr.Error + + // Field name the error occurred on. + Field() string + + // SetContext updates the context of the error. + SetContext(string) + + // AddNestedContext updates the error's context to include a nested level. + AddNestedContext(string) +} + +type errInvalidParam struct { + context string + nestedContext string + field string + code string + msg string +} + +// Code returns the error code for the type of invalid parameter. +func (e *errInvalidParam) Code() string { + return e.code +} + +// Message returns the reason the parameter was invalid, and its context. +func (e *errInvalidParam) Message() string { + return fmt.Sprintf("%s, %s.", e.msg, e.Field()) +} + +// Error returns the string version of the invalid parameter error. +func (e *errInvalidParam) Error() string { + return fmt.Sprintf("%s: %s", e.code, e.Message()) +} + +// OrigErr returns nil, Implemented for awserr.Error interface. +func (e *errInvalidParam) OrigErr() error { + return nil +} + +// Field Returns the field and context the error occurred. +func (e *errInvalidParam) Field() string { + field := e.context + if len(field) > 0 { + field += "." + } + if len(e.nestedContext) > 0 { + field += fmt.Sprintf("%s.", e.nestedContext) + } + field += e.field + + return field +} + +// SetContext updates the base context of the error. +func (e *errInvalidParam) SetContext(ctx string) { + e.context = ctx +} + +// AddNestedContext prepends a context to the field's path. +func (e *errInvalidParam) AddNestedContext(ctx string) { + if len(e.nestedContext) == 0 { + e.nestedContext = ctx + } else { + e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext) + } + +} + +// An ErrParamRequired represents an required parameter error. +type ErrParamRequired struct { + errInvalidParam +} + +// NewErrParamRequired creates a new required parameter error. +func NewErrParamRequired(field string) *ErrParamRequired { + return &ErrParamRequired{ + errInvalidParam{ + code: ParamRequiredErrCode, + field: field, + msg: fmt.Sprintf("missing required field"), + }, + } +} + +// An ErrParamMinValue represents a minimum value parameter error. +type ErrParamMinValue struct { + errInvalidParam + min float64 +} + +// NewErrParamMinValue creates a new minimum value parameter error. +func NewErrParamMinValue(field string, min float64) *ErrParamMinValue { + return &ErrParamMinValue{ + errInvalidParam: errInvalidParam{ + code: ParamMinValueErrCode, + field: field, + msg: fmt.Sprintf("minimum field value of %v", min), + }, + min: min, + } +} + +// MinValue returns the field's require minimum value. +// +// float64 is returned for both int and float min values. +func (e *ErrParamMinValue) MinValue() float64 { + return e.min +} + +// An ErrParamMinLen represents a minimum length parameter error. +type ErrParamMinLen struct { + errInvalidParam + min int +} + +// NewErrParamMinLen creates a new minimum length parameter error. +func NewErrParamMinLen(field string, min int) *ErrParamMinLen { + return &ErrParamMinLen{ + errInvalidParam: errInvalidParam{ + code: ParamMinValueErrCode, + field: field, + msg: fmt.Sprintf("minimum field size of %v", min), + }, + min: min, + } +} + +// MinLen returns the field's required minimum length. +func (e *ErrParamMinLen) MinLen() int { + return e.min +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 47e4536ff..6bc8f1be9 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -86,7 +86,7 @@ func initHandlers(s *Session) { // // Example: // // Create a copy of the current session, configured for the us-west-2 region. -// sess.Copy(&aws.Config{Region: aws.String("us-west-2"}) +// sess.Copy(&aws.Config{Region: aws.String("us-west-2")}) func (s *Session) Copy(cfgs ...*aws.Config) *Session { newSession := &Session{ Config: s.Config.Copy(cfgs...), diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 805dc711d..819485663 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.1.15" +const SDKVersion = "1.1.23" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go index 1d552afe4..7ad674278 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go @@ -120,7 +120,8 @@ func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) name = locName } - fmt.Fprintf(buf, "%q:", name) + writeString(name, buf) + buf.WriteString(`:`) err := buildAny(member, buf, field.Tag) if err != nil { @@ -167,7 +168,9 @@ func buildMap(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) err buf.WriteByte(',') } - fmt.Fprintf(buf, "%q:", k) + writeString(k.String(), buf) + buf.WriteString(`:`) + buildAny(value.MapIndex(k), buf, "") } diff --git a/vendor/github.com/aws/aws-sdk-go/private/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/private/signer/v4/v4.go index 14b0c6616..476580056 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/private/signer/v4/v4.go @@ -29,8 +29,8 @@ const ( var ignoredHeaders = rules{ blacklist{ mapRule{ - "Content-Length": struct{}{}, - "User-Agent": struct{}{}, + "Authorization": struct{}{}, + "User-Agent": struct{}{}, }, }, } @@ -153,6 +153,7 @@ func Sign(req *request.Request) { } req.Error = s.sign() + req.Time = s.Time req.SignedHeaderVals = s.signedHeaderVals } @@ -162,11 +163,12 @@ func (v4 *signer) sign() error { } if v4.isRequestSigned() { - if !v4.Credentials.IsExpired() { + if !v4.Credentials.IsExpired() && time.Now().Before(v4.Time.Add(10*time.Minute)) { // If the request is already signed, and the credentials have not - // expired yet ignore the signing request. + // expired, and the request is not too old ignore the signing request. return nil } + v4.Time = time.Now() // The credentials have expired for this request. The current signing // is invalid, and needs to be request because the request will fail. @@ -303,13 +305,18 @@ func (v4 *signer) buildCanonicalHeaders(r rule, header http.Header) { if !r.IsValid(canonicalKey) { continue // ignored header } - - lowerCaseKey := strings.ToLower(k) - headers = append(headers, lowerCaseKey) - if v4.signedHeaderVals == nil { v4.signedHeaderVals = make(http.Header) } + + lowerCaseKey := strings.ToLower(k) + if _, ok := v4.signedHeaderVals[lowerCaseKey]; ok { + // include additional values + v4.signedHeaderVals[lowerCaseKey] = append(v4.signedHeaderVals[lowerCaseKey], v...) + continue + } + + headers = append(headers, lowerCaseKey) v4.signedHeaderVals[lowerCaseKey] = v } sort.Strings(headers) @@ -326,11 +333,11 @@ func (v4 *signer) buildCanonicalHeaders(r rule, header http.Header) { headerValues[i] = "host:" + v4.Request.URL.Host } else { headerValues[i] = k + ":" + - strings.Join(v4.Request.Header[http.CanonicalHeaderKey(k)], ",") + strings.Join(v4.signedHeaderVals[k], ",") } } - v4.canonicalHeaders = strings.Join(headerValues, "\n") + v4.canonicalHeaders = strings.Join(stripExcessSpaces(headerValues), "\n") } func (v4 *signer) buildCanonicalString() { @@ -436,3 +443,23 @@ func makeSha256Reader(reader io.ReadSeeker) []byte { io.Copy(hash, reader) return hash.Sum(nil) } + +func stripExcessSpaces(headerVals []string) []string { + vals := make([]string, len(headerVals)) + for i, str := range headerVals { + stripped := "" + found := false + str = strings.TrimSpace(str) + for _, c := range str { + if !found && c == ' ' { + stripped += string(c) + found = true + } else if c != ' ' { + stripped += string(c) + found = false + } + } + vals[i] = stripped + } + return vals +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index a40689d14..698647d13 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -32,6 +32,7 @@ func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request return } +// Create an ApiKey resource. func (c *APIGateway) CreateApiKey(input *CreateApiKeyInput) (*ApiKey, error) { req, out := c.CreateApiKeyRequest(input) err := req.Send() @@ -58,6 +59,7 @@ func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req return } +// Adds a new Authorizer resource to an existing RestApi resource. func (c *APIGateway) CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error) { req, out := c.CreateAuthorizerRequest(input) err := req.Send() @@ -364,6 +366,7 @@ func (c *APIGateway) DeleteClientCertificateRequest(input *DeleteClientCertifica return } +// Deletes the ClientCertificate resource. func (c *APIGateway) DeleteClientCertificate(input *DeleteClientCertificateInput) (*DeleteClientCertificateOutput, error) { req, out := c.DeleteClientCertificateRequest(input) err := req.Send() @@ -739,6 +742,7 @@ func (c *APIGateway) GenerateClientCertificateRequest(input *GenerateClientCerti return } +// Generates a ClientCertificate resource. func (c *APIGateway) GenerateClientCertificate(input *GenerateClientCertificateInput) (*ClientCertificate, error) { req, out := c.GenerateClientCertificateRequest(input) err := req.Send() @@ -982,6 +986,7 @@ func (c *APIGateway) GetClientCertificateRequest(input *GetClientCertificateInpu return } +// Gets information about the current ClientCertificate resource. func (c *APIGateway) GetClientCertificate(input *GetClientCertificateInput) (*ClientCertificate, error) { req, out := c.GetClientCertificateRequest(input) err := req.Send() @@ -1014,6 +1019,7 @@ func (c *APIGateway) GetClientCertificatesRequest(input *GetClientCertificatesIn return } +// Gets a collection of ClientCertificate resources. func (c *APIGateway) GetClientCertificates(input *GetClientCertificatesInput) (*GetClientCertificatesOutput, error) { req, out := c.GetClientCertificatesRequest(input) err := req.Send() @@ -1185,6 +1191,7 @@ func (c *APIGateway) GetExportRequest(input *GetExportInput) (req *request.Reque return } +// Exports a deployed version of a RestApi in a specified format. func (c *APIGateway) GetExport(input *GetExportInput) (*GetExportOutput, error) { req, out := c.GetExportRequest(input) err := req.Send() @@ -1551,6 +1558,7 @@ func (c *APIGateway) GetSdkRequest(input *GetSdkInput) (req *request.Request, ou return } +// Generates a client SDK for a RestApi and Stage. func (c *APIGateway) GetSdk(input *GetSdkInput) (*GetSdkOutput, error) { req, out := c.GetSdkRequest(input) err := req.Send() @@ -1611,6 +1619,34 @@ func (c *APIGateway) GetStages(input *GetStagesInput) (*GetStagesOutput, error) return out, err } +const opImportRestApi = "ImportRestApi" + +// ImportRestApiRequest generates a request for the ImportRestApi operation. +func (c *APIGateway) ImportRestApiRequest(input *ImportRestApiInput) (req *request.Request, output *RestApi) { + op := &request.Operation{ + Name: opImportRestApi, + HTTPMethod: "POST", + HTTPPath: "/restapis?mode=import", + } + + if input == nil { + input = &ImportRestApiInput{} + } + + req = c.newRequest(op, input, output) + output = &RestApi{} + req.Data = output + return +} + +// A feature of the Amazon API Gateway control service for creating a new API +// from an external API definition file. +func (c *APIGateway) ImportRestApi(input *ImportRestApiInput) (*RestApi, error) { + req, out := c.ImportRestApiRequest(input) + err := req.Send() + return out, err +} + const opPutIntegration = "PutIntegration" // PutIntegrationRequest generates a request for the PutIntegration operation. @@ -1719,6 +1755,36 @@ func (c *APIGateway) PutMethodResponse(input *PutMethodResponseInput) (*MethodRe return out, err } +const opPutRestApi = "PutRestApi" + +// PutRestApiRequest generates a request for the PutRestApi operation. +func (c *APIGateway) PutRestApiRequest(input *PutRestApiInput) (req *request.Request, output *RestApi) { + op := &request.Operation{ + Name: opPutRestApi, + HTTPMethod: "PUT", + HTTPPath: "/restapis/{restapi_id}", + } + + if input == nil { + input = &PutRestApiInput{} + } + + req = c.newRequest(op, input, output) + output = &RestApi{} + req.Data = output + return +} + +// A feature of the Amazon API Gateway control service for updating an existing +// API with an input of external API definitions. The update can take the form +// of merging the supplied definition into the existing API or overwriting the +// existing API. +func (c *APIGateway) PutRestApi(input *PutRestApiInput) (*RestApi, error) { + req, out := c.PutRestApiRequest(input) + err := req.Send() + return out, err +} + const opTestInvokeAuthorizer = "TestInvokeAuthorizer" // TestInvokeAuthorizerRequest generates a request for the TestInvokeAuthorizer operation. @@ -1739,6 +1805,8 @@ func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInpu return } +// Simulate the execution of an Authorizer in your RestApi with headers, parameters, +// and an incoming request body. func (c *APIGateway) TestInvokeAuthorizer(input *TestInvokeAuthorizerInput) (*TestInvokeAuthorizerOutput, error) { req, out := c.TestInvokeAuthorizerRequest(input) err := req.Send() @@ -1765,6 +1833,8 @@ func (c *APIGateway) TestInvokeMethodRequest(input *TestInvokeMethodInput) (req return } +// Simulate the execution of a Method in your RestApi with headers, parameters, +// and an incoming request body. func (c *APIGateway) TestInvokeMethod(input *TestInvokeMethodInput) (*TestInvokeMethodOutput, error) { req, out := c.TestInvokeMethodRequest(input) err := req.Send() @@ -1899,6 +1969,7 @@ func (c *APIGateway) UpdateClientCertificateRequest(input *UpdateClientCertifica return } +// Changes information about an ClientCertificate resource. func (c *APIGateway) UpdateClientCertificate(input *UpdateClientCertificateInput) (*ClientCertificate, error) { req, out := c.UpdateClientCertificateRequest(input) err := req.Send() @@ -2243,6 +2314,10 @@ func (s ApiKey) GoString() string { type Authorizer struct { _ struct{} `type:"structure"` + // Optional customer-defined field, used in Swagger imports/exports. Has no + // functional impact. + AuthType *string `locationName:"authType" type:"string"` + // Specifies the credentials required for the authorizer, if any. Two options // are available. To specify an IAM Role for Amazon API Gateway to assume, use // the role's Amazon Resource Name (ARN). To use resource-based permissions @@ -2323,17 +2398,27 @@ func (s BasePathMapping) GoString() string { return s.String() } +// Represents a Client Certificate used to configure client-side SSL authentication +// while sending requests to the integration endpoint. type ClientCertificate struct { _ struct{} `type:"structure"` + // The identifier of the Client Certificate. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + // The date when the Client Certificate was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" + // target="_blank). CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + // The description of the Client Certificate. Description *string `locationName:"description" type:"string"` + // The date when the Client Certificate will expire, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" + // target="_blank). ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp" timestampFormat:"unix"` + // The PEM-encoded public key of the Client Certificate, that can be used to + // configure certificate authentication in the integration endpoint . PemEncodedCertificate *string `locationName:"pemEncodedCertificate" type:"string"` } @@ -2347,6 +2432,7 @@ func (s ClientCertificate) GoString() string { return s.String() } +// Request to create an ApiKey resource. type CreateApiKeyInput struct { _ struct{} `type:"structure"` @@ -2373,9 +2459,14 @@ func (s CreateApiKeyInput) GoString() string { return s.String() } +// Request to add a new Authorizer to an existing RestApi resource. type CreateAuthorizerInput struct { _ struct{} `type:"structure"` + // Optional customer-defined field, used in Swagger imports/exports. Has no + // functional impact. + AuthType *string `locationName:"authType" type:"string"` + // Specifies the credentials required for the authorizer, if any. AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"` @@ -2394,6 +2485,7 @@ type CreateAuthorizerInput struct { // [Required] The name of the authorizer. Name *string `locationName:"name" type:"string" required:"true"` + // The RestApi identifier under which the Authorizer will be created. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` // [Required] The type of the authorizer. @@ -2410,6 +2502,31 @@ func (s CreateAuthorizerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"} + if s.AuthorizerUri == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerUri")) + } + if s.IdentitySource == nil { + invalidParams.Add(request.NewErrParamRequired("IdentitySource")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to create a new BasePathMapping resource. type CreateBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -2442,6 +2559,22 @@ func (s CreateBasePathMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBasePathMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBasePathMappingInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to create a Deployment resource. type CreateDeploymentInput struct { _ struct{} `type:"structure"` @@ -2481,6 +2614,22 @@ func (s CreateDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A request to create a new domain name. type CreateDomainNameInput struct { _ struct{} `type:"structure"` @@ -2516,6 +2665,31 @@ func (s CreateDomainNameInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDomainNameInput"} + if s.CertificateBody == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateBody")) + } + if s.CertificateChain == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateChain")) + } + if s.CertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateName")) + } + if s.CertificatePrivateKey == nil { + invalidParams.Add(request.NewErrParamRequired("CertificatePrivateKey")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to add a new Model to an existing RestApi resource. type CreateModelInput struct { _ struct{} `type:"structure"` @@ -2547,6 +2721,25 @@ func (s CreateModelInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"} + if s.ContentType == nil { + invalidParams.Add(request.NewErrParamRequired("ContentType")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to create a Resource resource. type CreateResourceInput struct { _ struct{} `type:"structure"` @@ -2571,7 +2764,26 @@ func (s CreateResourceInput) GoString() string { return s.String() } -// Request to add a new RestApi resource to your collection. +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResourceInput"} + if s.ParentId == nil { + invalidParams.Add(request.NewErrParamRequired("ParentId")) + } + if s.PathPart == nil { + invalidParams.Add(request.NewErrParamRequired("PathPart")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// The POST Request to add a new RestApi resource to your collection. type CreateRestApiInput struct { _ struct{} `type:"structure"` @@ -2595,6 +2807,19 @@ func (s CreateRestApiInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRestApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRestApiInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to create a Stage resource. type CreateStageInput struct { _ struct{} `type:"structure"` @@ -2632,6 +2857,25 @@ func (s CreateStageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStageInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A request to delete the ApiKey resource. type DeleteApiKeyInput struct { _ struct{} `type:"structure"` @@ -2650,6 +2894,19 @@ func (s DeleteApiKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApiKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApiKeyInput"} + if s.ApiKey == nil { + invalidParams.Add(request.NewErrParamRequired("ApiKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteApiKeyOutput struct { _ struct{} `type:"structure"` } @@ -2685,6 +2942,22 @@ func (s DeleteAuthorizerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAuthorizerInput"} + if s.AuthorizerId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAuthorizerOutput struct { _ struct{} `type:"structure"` } @@ -2720,6 +2993,22 @@ func (s DeleteBasePathMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBasePathMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBasePathMappingInput"} + if s.BasePath == nil { + invalidParams.Add(request.NewErrParamRequired("BasePath")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBasePathMappingOutput struct { _ struct{} `type:"structure"` } @@ -2734,9 +3023,11 @@ func (s DeleteBasePathMappingOutput) GoString() string { return s.String() } +// A request to delete the ClientCertificate resource. type DeleteClientCertificateInput struct { _ struct{} `type:"structure"` + // The identifier of the ClientCertificate resource to be deleted. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` } @@ -2750,6 +3041,19 @@ func (s DeleteClientCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClientCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClientCertificateInput"} + if s.ClientCertificateId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteClientCertificateOutput struct { _ struct{} `type:"structure"` } @@ -2785,6 +3089,22 @@ func (s DeleteDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDeploymentOutput struct { _ struct{} `type:"structure"` } @@ -2817,6 +3137,19 @@ func (s DeleteDomainNameInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDomainNameInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDomainNameOutput struct { _ struct{} `type:"structure"` } @@ -2855,6 +3188,25 @@ func (s DeleteIntegrationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteIntegrationOutput struct { _ struct{} `type:"structure"` } @@ -2896,6 +3248,28 @@ func (s DeleteIntegrationResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteIntegrationResponseOutput struct { _ struct{} `type:"structure"` } @@ -2934,6 +3308,25 @@ func (s DeleteMethodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMethodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMethodInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteMethodOutput struct { _ struct{} `type:"structure"` } @@ -2975,6 +3368,28 @@ func (s DeleteMethodResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMethodResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMethodResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteMethodResponseOutput struct { _ struct{} `type:"structure"` } @@ -3010,6 +3425,22 @@ func (s DeleteModelInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"} + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteModelOutput struct { _ struct{} `type:"structure"` } @@ -3045,6 +3476,22 @@ func (s DeleteResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteResourceOutput struct { _ struct{} `type:"structure"` } @@ -3077,6 +3524,19 @@ func (s DeleteRestApiInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRestApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRestApiInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRestApiOutput struct { _ struct{} `type:"structure"` } @@ -3112,6 +3572,22 @@ func (s DeleteStageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteStageOutput struct { _ struct{} `type:"structure"` } @@ -3208,6 +3684,22 @@ func (s FlushStageAuthorizersCacheInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *FlushStageAuthorizersCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FlushStageAuthorizersCacheInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type FlushStageAuthorizersCacheOutput struct { _ struct{} `type:"structure"` } @@ -3243,6 +3735,22 @@ func (s FlushStageCacheInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *FlushStageCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FlushStageCacheInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type FlushStageCacheOutput struct { _ struct{} `type:"structure"` } @@ -3257,9 +3765,11 @@ func (s FlushStageCacheOutput) GoString() string { return s.String() } +// A request to generate a ClientCertificate resource. type GenerateClientCertificateInput struct { _ struct{} `type:"structure"` + // The description of the ClientCertificate. Description *string `locationName:"description" type:"string"` } @@ -3307,6 +3817,19 @@ func (s GetApiKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApiKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApiKeyInput"} + if s.ApiKey == nil { + invalidParams.Add(request.NewErrParamRequired("ApiKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A request to get information about the current ApiKeys resource. type GetApiKeysInput struct { _ struct{} `type:"structure"` @@ -3369,12 +3892,31 @@ func (s GetAuthorizerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAuthorizerInput"} + if s.AuthorizerId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to describe an existing Authorizers resource. type GetAuthorizersInput struct { _ struct{} `type:"structure"` + // Limit the number of Authorizer resources in the response. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` + // If not all Authorizer resources in the response were present, the position + // will specificy where to start the next page of results. Position *string `location:"querystring" locationName:"position" type:"string"` // The RestApi identifier for the Authorizers resource. @@ -3391,6 +3933,19 @@ func (s GetAuthorizersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAuthorizersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAuthorizersInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a collection of Authorizer resources. type GetAuthorizersOutput struct { _ struct{} `type:"structure"` @@ -3435,6 +3990,22 @@ func (s GetBasePathMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBasePathMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingInput"} + if s.BasePath == nil { + invalidParams.Add(request.NewErrParamRequired("BasePath")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A request to get information about a collection of BasePathMapping resources. type GetBasePathMappingsInput struct { _ struct{} `type:"structure"` @@ -3462,6 +4033,19 @@ func (s GetBasePathMappingsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBasePathMappingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a collection of BasePathMapping resources. type GetBasePathMappingsOutput struct { _ struct{} `type:"structure"` @@ -3483,9 +4067,11 @@ func (s GetBasePathMappingsOutput) GoString() string { return s.String() } +// A request to get information about the current ClientCertificate resource. type GetClientCertificateInput struct { _ struct{} `type:"structure"` + // The identifier of the ClientCertificate resource to be described. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` } @@ -3499,11 +4085,30 @@ func (s GetClientCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetClientCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetClientCertificateInput"} + if s.ClientCertificateId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// A request to get information about a collection of ClientCertificate resources. type GetClientCertificatesInput struct { _ struct{} `type:"structure"` + // The maximum number of ClientCertificate resources in the collection to get + // information about. The default limit is 25. It should be an integer between + // 1 - 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` + // The position of the current ClientCertificate resource in the collection + // to get information about. Position *string `location:"querystring" locationName:"position" type:"string"` } @@ -3517,9 +4122,12 @@ func (s GetClientCertificatesInput) GoString() string { return s.String() } +// Represents a collection of ClientCertificate resources. type GetClientCertificatesOutput struct { _ struct{} `type:"structure"` + // The current page of any ClientCertificate resources in the collection of + // ClientCertificate resources. Items []*ClientCertificate `locationName:"item" type:"list"` Position *string `locationName:"position" type:"string"` @@ -3557,6 +4165,22 @@ func (s GetDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to get information about a Deployments collection. type GetDeploymentsInput struct { _ struct{} `type:"structure"` @@ -3584,6 +4208,19 @@ func (s GetDeploymentsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentsInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a collection resource that contains zero or more references to // your existing deployments, and links that guide you on ways to interact with // your collection. The collection offers a paginated view of the contained @@ -3626,6 +4263,19 @@ func (s GetDomainNameInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDomainNameInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to describe a collection of DomainName resources. type GetDomainNamesInput struct { _ struct{} `type:"structure"` @@ -3669,17 +4319,30 @@ func (s GetDomainNamesOutput) GoString() string { return s.String() } +// Request a new export of a RestApi for a particular Stage. type GetExportInput struct { _ struct{} `type:"structure"` + // The content-type of the export, for example 'application/json'. Currently + // 'application/json' and 'application/yaml' are supported for exportType 'swagger'. + // Should be specifed in the 'Accept' header for direct API requests. Accepts *string `location:"header" locationName:"Accept" type:"string"` + // The type of export. Currently only 'swagger' is supported. ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"` + // A key-value map of query string parameters that specify properties of the + // export, depending on the requested exportType. For exportType 'swagger', + // any combination of the following parameters are supported: 'integrations' + // will export x-amazon-apigateway-integration extensions 'authorizers' will + // export x-amazon-apigateway-authorizer extensions 'postman' will export with + // Postman extensions, allowing for import to the Postman tool Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` + // The identifier of the RestApi to be exported. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` + // The name of the Stage that will be exported. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` } @@ -3693,13 +4356,37 @@ func (s GetExportInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetExportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetExportInput"} + if s.ExportType == nil { + invalidParams.Add(request.NewErrParamRequired("ExportType")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// The binary blob response to GetExport, which contains the generated SDK. type GetExportOutput struct { _ struct{} `type:"structure" payload:"Body"` + // The binary blob response to GetExport, which contains the export. Body []byte `locationName:"body" type:"blob"` + // The content-disposition header value in the HTTP reseponse. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` + // The content-type header value in the HTTP response. This will correspond + // to a valid 'accept' type in the request. ContentType *string `location:"header" locationName:"Content-Type" type:"string"` } @@ -3737,6 +4424,25 @@ func (s GetIntegrationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetIntegrationInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a get integration response request. type GetIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -3764,6 +4470,28 @@ func (s GetIntegrationResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to describe an existing Method resource. type GetMethodInput struct { _ struct{} `type:"structure"` @@ -3788,6 +4516,25 @@ func (s GetMethodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetMethodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetMethodInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to describe a MethodResponse resource. type GetMethodResponseInput struct { _ struct{} `type:"structure"` @@ -3815,6 +4562,28 @@ func (s GetMethodResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetMethodResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetMethodResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to list information about a model in an existing RestApi resource. type GetModelInput struct { _ struct{} `type:"structure"` @@ -3839,6 +4608,22 @@ func (s GetModelInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetModelInput"} + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to generate a sample mapping template used to transform the payload. type GetModelTemplateInput struct { _ struct{} `type:"structure"` @@ -3860,6 +4645,22 @@ func (s GetModelTemplateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetModelTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetModelTemplateInput"} + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a mapping template used to transform a payload. type GetModelTemplateOutput struct { _ struct{} `type:"structure"` @@ -3905,6 +4706,19 @@ func (s GetModelsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetModelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetModelsInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a collection of Model resources. type GetModelsOutput struct { _ struct{} `type:"structure"` @@ -3946,6 +4760,22 @@ func (s GetResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to list information about a collection of resources. type GetResourcesInput struct { _ struct{} `type:"structure"` @@ -3972,6 +4802,19 @@ func (s GetResourcesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourcesInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a collection of Resource resources. type GetResourcesOutput struct { _ struct{} `type:"structure"` @@ -3992,7 +4835,7 @@ func (s GetResourcesOutput) GoString() string { return s.String() } -// Request to list an existing RestApi defined for your collection. +// The GET request to list an existing RestApi defined for your collection. type GetRestApiInput struct { _ struct{} `type:"structure"` @@ -4010,7 +4853,20 @@ func (s GetRestApiInput) GoString() string { return s.String() } -// Request to list existing RestApis defined for your collection. +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRestApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRestApiInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// The GET request to list existing RestApis defined for your collection. type GetRestApisInput struct { _ struct{} `type:"structure"` @@ -4054,15 +4910,24 @@ func (s GetRestApisOutput) GoString() string { return s.String() } +// Request a new generated client SDK for a RestApi and Stage. type GetSdkInput struct { _ struct{} `type:"structure"` + // A key-value map of query string parameters that specify properties of the + // SDK, depending on the requested sdkType. For sdkType 'objectivec', a parameter + // named "classPrefix" is required. For sdkType 'android', parameters named + // "groupId", "artifactId", "artifactVersion", and "invokerPackage" are required. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` + // The identifier of the RestApi that the SDK will use. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` + // The language for the generated SDK. Currently javascript, android, and objectivec + // (for iOS) are supported. SdkType *string `location:"uri" locationName:"sdk_type" type:"string" required:"true"` + // The name of the Stage that the SDK will use. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` } @@ -4076,13 +4941,36 @@ func (s GetSdkInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSdkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSdkInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.SdkType == nil { + invalidParams.Add(request.NewErrParamRequired("SdkType")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// The binary blob response to GetSdk, which contains the generated SDK. type GetSdkOutput struct { _ struct{} `type:"structure" payload:"Body"` + // The binary blob response to GetSdk, which contains the generated SDK. Body []byte `locationName:"body" type:"blob"` + // The content-disposition header value in the HTTP reseponse. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` + // The content-type header value in the HTTP response. ContentType *string `location:"header" locationName:"Content-Type" type:"string"` } @@ -4118,6 +5006,22 @@ func (s GetStageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStageInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to get information about one or more Stage resources. type GetStagesInput struct { _ struct{} `type:"structure"` @@ -4139,6 +5043,19 @@ func (s GetStagesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetStagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStagesInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A list of Stage resource that are associated with the ApiKey resource. type GetStagesOutput struct { _ struct{} `type:"structure"` @@ -4157,6 +5074,46 @@ func (s GetStagesOutput) GoString() string { return s.String() } +// A POST request to import an API to Amazon API Gateway using an input of an +// API definition file. +type ImportRestApiInput struct { + _ struct{} `type:"structure" payload:"Body"` + + // The POST request body containing external API definitions. Currently, only + // Swagger definition JSON files are supported. + Body []byte `locationName:"body" type:"blob" required:"true"` + + // A query parameter to indicate whether to rollback the API creation (true) + // or not (false) when a warning is encountered. The default value is false. + FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"` + + // Custom header parameters as part of the request. + Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` +} + +// String returns the string representation +func (s ImportRestApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportRestApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportRestApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportRestApiInput"} + if s.Body == nil { + invalidParams.Add(request.NewErrParamRequired("Body")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a HTTP, AWS, or Mock integration. type Integration struct { _ struct{} `type:"structure"` @@ -4194,7 +5151,7 @@ type Integration struct { // Specifies the integration's request templates. RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - // Specifies the integration's type. + // Specifies the integration's type. The valid value is HTTP, AWS, or MOCK. Type *string `locationName:"type" type:"string" enum:"IntegrationType"` // Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, @@ -4545,7 +5502,9 @@ type PutIntegrationInput struct { Type *string `locationName:"type" type:"string" required:"true" enum:"IntegrationType"` // Specifies a put integration input's Uniform Resource Identifier (URI). When - // the integration type is HTTP or AWS, this field is required. + // the integration type is HTTP or AWS, this field is required. For integration + // with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway::lambda:path/2015-03-31/functions//invocations' + // format. Uri *string `locationName:"uri" type:"string"` } @@ -4559,6 +5518,28 @@ func (s PutIntegrationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutIntegrationInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a put integration response request. type PutIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -4602,6 +5583,28 @@ func (s PutIntegrationResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutIntegrationResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to add a method to an existing Resource resource. type PutMethodInput struct { _ struct{} `type:"structure"` @@ -4651,6 +5654,28 @@ func (s PutMethodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutMethodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutMethodInput"} + if s.AuthorizationType == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizationType")) + } + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to add a MethodResponse to an existing Method resource. type PutMethodResponseInput struct { _ struct{} `type:"structure"` @@ -4692,6 +5717,78 @@ func (s PutMethodResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutMethodResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutMethodResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// A PUT request to update an existing API, with external API definitions specified +// as the request body. +type PutRestApiInput struct { + _ struct{} `type:"structure" payload:"Body"` + + // The PUT request body containing external API definitions. Currently, only + // Swagger definition JSON files are supported. + Body []byte `locationName:"body" type:"blob" required:"true"` + + // A query parameter to indicate whether to rollback the API update (true) or + // not (false) when a warning is encountered. The default value is false. + FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"` + + // The mode query parameter to specify the update mode. Valid values are "merge" + // and "overwrite". By default, the update mode is "merge". + Mode *string `location:"querystring" locationName:"mode" type:"string" enum:"PutMode"` + + // Custom headers supplied as part of the request. + Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` + + // The identifier of the RestApi to be updated. + RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutRestApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRestApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRestApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRestApiInput"} + if s.Body == nil { + invalidParams.Add(request.NewErrParamRequired("Body")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a resource. type Resource struct { _ struct{} `type:"structure"` @@ -4708,8 +5805,8 @@ type Resource struct { // The last path segment for this resource. PathPart *string `locationName:"pathPart" type:"string"` - // Map of methods for this resource, which is included only if requested using - // the embed option. + // Map of methods for this resource, which is included only if the request uses + // the embed query option. ResourceMethods map[string]*Method `locationName:"resourceMethods" type:"map"` } @@ -4740,6 +5837,8 @@ type RestApi struct { // The API's name. Name *string `locationName:"name" type:"string"` + + Warnings []*string `locationName:"warnings" type:"list"` } // String returns the string representation @@ -4827,21 +5926,33 @@ func (s StageKey) GoString() string { return s.String() } +// Make a request to simulate the execution of an Authorizer. type TestInvokeAuthorizerInput struct { _ struct{} `type:"structure"` + // [Optional] A key-value map of additional context variables. AdditionalContext map[string]*string `locationName:"additionalContext" type:"map"` + // Specifies a test invoke authorizer request's Authorizer ID. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` + // [Optional] The simulated request body of an incoming invocation request. Body *string `locationName:"body" type:"string"` + // [Required] A key-value map of headers to simulate an incoming invocation + // request. This is where the incoming authorization token, or identity source, + // should be specified. Headers map[string]*string `locationName:"headers" type:"map"` + // [Optional] The URI path, including query string, of the simulated invocation + // request. Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` + // Specifies a test invoke authorizer request's RestApi identifier. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` + // A key-value map of stage variables to simulate an invocation on a deployed + // Stage. StageVariables map[string]*string `locationName:"stageVariables" type:"map"` } @@ -4855,6 +5966,22 @@ func (s TestInvokeAuthorizerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestInvokeAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestInvokeAuthorizerInput"} + if s.AuthorizerId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the response of the test invoke request in for a custom Authorizer type TestInvokeAuthorizerOutput struct { _ struct{} `type:"structure"` @@ -4888,23 +6015,36 @@ func (s TestInvokeAuthorizerOutput) GoString() string { return s.String() } +// Make a request to simulate the execution of a Method. type TestInvokeMethodInput struct { _ struct{} `type:"structure"` + // The simulated request body of an incoming invocation request. Body *string `locationName:"body" type:"string"` + // A ClientCertificate identifier to use in the test invocation. API Gateway + // will use use the certificate when making the HTTPS request to the defined + // backend endpoint. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + // A key-value map of headers to simulate an incoming invocation request. Headers map[string]*string `locationName:"headers" type:"map"` + // Specifies a test invoke method request's HTTP method. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` + // The URI path, including query string, of the simulated invocation request. + // Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` + // Specifies a test invoke method request's resource ID. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` + // Specifies a test invoke method request's API identifier. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` + // A key-value map of stage variables to simulate an invocation on a deployed + // Stage. StageVariables map[string]*string `locationName:"stageVariables" type:"map"` } @@ -4918,6 +6058,25 @@ func (s TestInvokeMethodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestInvokeMethodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestInvokeMethodInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the response of the test invoke request in HTTP method. type TestInvokeMethodOutput struct { _ struct{} `type:"structure"` @@ -5011,6 +6170,19 @@ func (s UpdateApiKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApiKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApiKeyInput"} + if s.ApiKey == nil { + invalidParams.Add(request.NewErrParamRequired("ApiKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to update an existing Authorizer resource. type UpdateAuthorizerInput struct { _ struct{} `type:"structure"` @@ -5036,6 +6208,22 @@ func (s UpdateAuthorizerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAuthorizerInput"} + if s.AuthorizerId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A request to change information about the BasePathMapping resource. type UpdateBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -5061,9 +6249,27 @@ func (s UpdateBasePathMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBasePathMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBasePathMappingInput"} + if s.BasePath == nil { + invalidParams.Add(request.NewErrParamRequired("BasePath")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// A request to change information about an ClientCertificate resource. type UpdateClientCertificateInput struct { _ struct{} `type:"structure"` + // The identifier of the ClientCertificate resource to be updated. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` // A list of operations describing the updates to apply to the specified resource. @@ -5081,6 +6287,19 @@ func (s UpdateClientCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateClientCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateClientCertificateInput"} + if s.ClientCertificateId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to change information about a Deployment resource. type UpdateDeploymentInput struct { _ struct{} `type:"structure"` @@ -5108,6 +6327,22 @@ func (s UpdateDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A request to change information about the DomainName resource. type UpdateDomainNameInput struct { _ struct{} `type:"structure"` @@ -5130,6 +6365,19 @@ func (s UpdateDomainNameInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDomainNameInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents an update integration request. type UpdateIntegrationInput struct { _ struct{} `type:"structure"` @@ -5158,6 +6406,25 @@ func (s UpdateIntegrationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents an update integration response request. type UpdateIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -5189,6 +6456,28 @@ func (s UpdateIntegrationResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to update an existing Method resource. type UpdateMethodInput struct { _ struct{} `type:"structure"` @@ -5217,6 +6506,25 @@ func (s UpdateMethodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateMethodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateMethodInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A request to update an existing MethodResponse resource. type UpdateMethodResponseInput struct { _ struct{} `type:"structure"` @@ -5248,6 +6556,28 @@ func (s UpdateMethodResponseInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateMethodResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateMethodResponseInput"} + if s.HttpMethod == nil { + invalidParams.Add(request.NewErrParamRequired("HttpMethod")) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StatusCode == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to update an existing model in an existing RestApi resource. type UpdateModelInput struct { _ struct{} `type:"structure"` @@ -5273,6 +6603,22 @@ func (s UpdateModelInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateModelInput"} + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to change information about a Resource resource. type UpdateResourceInput struct { _ struct{} `type:"structure"` @@ -5298,6 +6644,22 @@ func (s UpdateResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to update an existing RestApi resource in your collection. type UpdateRestApiInput struct { _ struct{} `type:"structure"` @@ -5320,6 +6682,19 @@ func (s UpdateRestApiInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRestApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRestApiInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Requests Amazon API Gateway to change information about a Stage resource. type UpdateStageInput struct { _ struct{} `type:"structure"` @@ -5346,6 +6721,23 @@ func (s UpdateStageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateStageInput"} + if s.RestApiId == nil { + invalidParams.Add(request.NewErrParamRequired("RestApiId")) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// The authorizer type. Only current value is TOKEN. const ( // @enum AuthorizerType AuthorizerTypeToken = "TOKEN" @@ -5385,7 +6777,7 @@ const ( CacheClusterStatusFlushInProgress = "FLUSH_IN_PROGRESS" ) -// The integration type. Possible values are HTTP, AWS, or Mock. +// The integration type. The valid value is HTTP, AWS, or MOCK. const ( // @enum IntegrationType IntegrationTypeHttp = "HTTP" @@ -5395,6 +6787,13 @@ const ( IntegrationTypeMock = "MOCK" ) +const ( + // @enum PutMode + PutModeMerge = "merge" + // @enum PutMode + PutModeOverwrite = "overwrite" +) + const ( // @enum UnauthorizedCacheControlHeaderStrategy UnauthorizedCacheControlHeaderStrategyFailWith403 = "FAIL_WITH_403" diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index 4958ba2a7..87ee5ab6e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -4,6 +4,7 @@ package autoscaling import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -1837,6 +1838,22 @@ func (s AttachInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachInstancesInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachInstancesOutput struct { _ struct{} `type:"structure"` } @@ -1871,6 +1888,19 @@ func (s AttachLoadBalancersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachLoadBalancersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancersInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachLoadBalancersOutput struct { _ struct{} `type:"structure"` } @@ -1916,6 +1946,30 @@ func (s BlockDeviceMapping) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BlockDeviceMapping) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BlockDeviceMapping"} + if s.DeviceName == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceName")) + } + if s.DeviceName != nil && len(*s.DeviceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceName", 1)) + } + if s.VirtualName != nil && len(*s.VirtualName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualName", 1)) + } + if s.Ebs != nil { + if err := s.Ebs.Validate(); err != nil { + invalidParams.AddNested("Ebs", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CompleteLifecycleActionInput struct { _ struct{} `type:"structure"` @@ -1948,6 +2002,37 @@ func (s CompleteLifecycleActionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompleteLifecycleActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompleteLifecycleActionInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.InstanceId != nil && len(*s.InstanceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) + } + if s.LifecycleActionResult == nil { + invalidParams.Add(request.NewErrParamRequired("LifecycleActionResult")) + } + if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 { + invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36)) + } + if s.LifecycleHookName == nil { + invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) + } + if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CompleteLifecycleActionOutput struct { _ struct{} `type:"structure"` } @@ -2077,6 +2162,56 @@ func (s CreateAutoScalingGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAutoScalingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAutoScalingGroupInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1)) + } + if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1)) + } + if s.InstanceId != nil && len(*s.InstanceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) + } + if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) + } + if s.MaxSize == nil { + invalidParams.Add(request.NewErrParamRequired("MaxSize")) + } + if s.MinSize == nil { + invalidParams.Add(request.NewErrParamRequired("MinSize")) + } + if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1)) + } + if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 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 + } + return nil +} + type CreateAutoScalingGroupOutput struct { _ struct{} `type:"structure"` } @@ -2245,6 +2380,62 @@ func (s CreateLaunchConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLaunchConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLaunchConfigurationInput"} + if s.ClassicLinkVPCId != nil && len(*s.ClassicLinkVPCId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClassicLinkVPCId", 1)) + } + if s.IamInstanceProfile != nil && len(*s.IamInstanceProfile) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IamInstanceProfile", 1)) + } + if s.ImageId != nil && len(*s.ImageId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageId", 1)) + } + if s.InstanceId != nil && len(*s.InstanceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) + } + if s.InstanceType != nil && len(*s.InstanceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) + } + if s.KernelId != nil && len(*s.KernelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KernelId", 1)) + } + if s.KeyName != nil && len(*s.KeyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyName", 1)) + } + if s.LaunchConfigurationName == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName")) + } + if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) + } + if s.PlacementTenancy != nil && len(*s.PlacementTenancy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PlacementTenancy", 1)) + } + if s.RamdiskId != nil && len(*s.RamdiskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RamdiskId", 1)) + } + if s.SpotPrice != nil && len(*s.SpotPrice) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SpotPrice", 1)) + } + if s.BlockDeviceMappings != nil { + for i, v := range s.BlockDeviceMappings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BlockDeviceMappings", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateLaunchConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -2276,6 +2467,29 @@ func (s CreateOrUpdateTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateOrUpdateTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateOrUpdateTagsInput"} + 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 +} + type CreateOrUpdateTagsOutput struct { _ struct{} `type:"structure"` } @@ -2312,6 +2526,22 @@ func (s DeleteAutoScalingGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAutoScalingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAutoScalingGroupInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAutoScalingGroupOutput struct { _ struct{} `type:"structure"` } @@ -2343,6 +2573,22 @@ func (s DeleteLaunchConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLaunchConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchConfigurationInput"} + if s.LaunchConfigurationName == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName")) + } + if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLaunchConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -2377,6 +2623,28 @@ func (s DeleteLifecycleHookInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLifecycleHookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLifecycleHookInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.LifecycleHookName == nil { + invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) + } + if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLifecycleHookOutput struct { _ struct{} `type:"structure"` } @@ -2412,6 +2680,28 @@ func (s DeleteNotificationConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNotificationConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationConfigurationInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.TopicARN == nil { + invalidParams.Add(request.NewErrParamRequired("TopicARN")) + } + if s.TopicARN != nil && len(*s.TopicARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteNotificationConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -2446,6 +2736,25 @@ func (s DeletePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeletePolicyOutput struct { _ struct{} `type:"structure"` } @@ -2480,6 +2789,25 @@ func (s DeleteScheduledActionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteScheduledActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.ScheduledActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) + } + if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteScheduledActionOutput struct { _ struct{} `type:"structure"` } @@ -2511,6 +2839,29 @@ func (s DeleteTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + 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 +} + type DeleteTagsOutput struct { _ struct{} `type:"structure"` } @@ -2831,6 +3182,22 @@ func (s DescribeLifecycleHooksInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLifecycleHooksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLifecycleHooksInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeLifecycleHooksOutput struct { _ struct{} `type:"structure"` @@ -2872,6 +3239,22 @@ func (s DescribeLoadBalancersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLoadBalancersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeLoadBalancersOutput struct { _ struct{} `type:"structure"` @@ -3005,6 +3388,19 @@ func (s DescribePoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePoliciesInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribePoliciesOutput struct { _ struct{} `type:"structure"` @@ -3057,6 +3453,19 @@ func (s DescribeScalingActivitiesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScalingActivitiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeScalingActivitiesOutput struct { _ struct{} `type:"structure"` @@ -3150,6 +3559,19 @@ func (s DescribeScheduledActionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScheduledActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeScheduledActionsOutput struct { _ struct{} `type:"structure"` @@ -3272,6 +3694,25 @@ func (s DetachInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachInstancesInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.ShouldDecrementDesiredCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachInstancesOutput struct { _ struct{} `type:"structure"` @@ -3309,6 +3750,19 @@ func (s DetachLoadBalancersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachLoadBalancersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancersInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachLoadBalancersOutput struct { _ struct{} `type:"structure"` } @@ -3360,6 +3814,22 @@ func (s DisableMetricsCollectionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableMetricsCollectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableMetricsCollectionInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableMetricsCollectionOutput struct { _ struct{} `type:"structure"` } @@ -3428,6 +3898,28 @@ func (s Ebs) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Ebs) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Ebs"} + if s.Iops != nil && *s.Iops < 100 { + invalidParams.Add(request.NewErrParamMinValue("Iops", 100)) + } + if s.SnapshotId != nil && len(*s.SnapshotId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1)) + } + if s.VolumeSize != nil && *s.VolumeSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1)) + } + if s.VolumeType != nil && len(*s.VolumeType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VolumeType", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableMetricsCollectionInput struct { _ struct{} `type:"structure"` @@ -3472,6 +3964,28 @@ func (s EnableMetricsCollectionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableMetricsCollectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableMetricsCollectionInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.Granularity == nil { + invalidParams.Add(request.NewErrParamRequired("Granularity")) + } + if s.Granularity != nil && len(*s.Granularity) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Granularity", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableMetricsCollectionOutput struct { _ struct{} `type:"structure"` } @@ -3550,6 +4064,25 @@ func (s EnterStandbyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnterStandbyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnterStandbyInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.ShouldDecrementDesiredCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnterStandbyOutput struct { _ struct{} `type:"structure"` @@ -3616,6 +4149,25 @@ func (s ExecutePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExecutePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExecutePolicyInput"} + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ExecutePolicyOutput struct { _ struct{} `type:"structure"` } @@ -3650,6 +4202,22 @@ func (s ExitStandbyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExitStandbyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExitStandbyInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ExitStandbyOutput struct { _ struct{} `type:"structure"` @@ -4242,6 +4810,34 @@ func (s PutLifecycleHookInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutLifecycleHookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutLifecycleHookInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.LifecycleHookName == nil { + invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) + } + if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) + } + if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1)) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutLifecycleHookOutput struct { _ struct{} `type:"structure"` } @@ -4281,6 +4877,31 @@ func (s PutNotificationConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutNotificationConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutNotificationConfigurationInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.NotificationTypes == nil { + invalidParams.Add(request.NewErrParamRequired("NotificationTypes")) + } + if s.TopicARN == nil { + invalidParams.Add(request.NewErrParamRequired("TopicARN")) + } + if s.TopicARN != nil && len(*s.TopicARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutNotificationConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -4374,6 +4995,50 @@ func (s PutScalingPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutScalingPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"} + if s.AdjustmentType == nil { + invalidParams.Add(request.NewErrParamRequired("AdjustmentType")) + } + if s.AdjustmentType != nil && len(*s.AdjustmentType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AdjustmentType", 1)) + } + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.MetricAggregationType != nil && len(*s.MetricAggregationType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricAggregationType", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.PolicyType != nil && len(*s.PolicyType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyType", 1)) + } + if s.StepAdjustments != nil { + for i, v := range s.StepAdjustments { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StepAdjustments", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutScalingPolicyOutput struct { _ struct{} `type:"structure"` @@ -4444,6 +5109,31 @@ func (s PutScheduledUpdateGroupActionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutScheduledUpdateGroupActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutScheduledUpdateGroupActionInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.Recurrence != nil && len(*s.Recurrence) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1)) + } + if s.ScheduledActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledActionName")) + } + if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutScheduledUpdateGroupActionOutput struct { _ struct{} `type:"structure"` } @@ -4486,6 +5176,34 @@ func (s RecordLifecycleActionHeartbeatInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RecordLifecycleActionHeartbeatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RecordLifecycleActionHeartbeatInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.InstanceId != nil && len(*s.InstanceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) + } + if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 { + invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36)) + } + if s.LifecycleHookName == nil { + invalidParams.Add(request.NewErrParamRequired("LifecycleHookName")) + } + if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RecordLifecycleActionHeartbeatOutput struct { _ struct{} `type:"structure"` } @@ -4614,6 +5332,22 @@ func (s ScalingProcessQuery) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScalingProcessQuery) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScalingProcessQuery"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a scheduled update to an Auto Scaling group. type ScheduledUpdateGroupAction struct { _ struct{} `type:"structure"` @@ -4690,6 +5424,25 @@ func (s SetDesiredCapacityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetDesiredCapacityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetDesiredCapacityInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.DesiredCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("DesiredCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetDesiredCapacityOutput struct { _ struct{} `type:"structure"` } @@ -4735,6 +5488,28 @@ func (s SetInstanceHealthInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetInstanceHealthInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetInstanceHealthInput"} + if s.HealthStatus == nil { + invalidParams.Add(request.NewErrParamRequired("HealthStatus")) + } + if s.HealthStatus != nil && len(*s.HealthStatus) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthStatus", 1)) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.InstanceId != nil && len(*s.InstanceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetInstanceHealthOutput struct { _ struct{} `type:"structure"` } @@ -4773,6 +5548,28 @@ func (s SetInstanceProtectionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetInstanceProtectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetInstanceProtectionInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + if s.ProtectedFromScaleIn == nil { + invalidParams.Add(request.NewErrParamRequired("ProtectedFromScaleIn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetInstanceProtectionOutput struct { _ struct{} `type:"structure"` } @@ -4851,6 +5648,19 @@ func (s StepAdjustment) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StepAdjustment) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StepAdjustment"} + if s.ScalingAdjustment == nil { + invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SuspendProcessesOutput struct { _ struct{} `type:"structure"` } @@ -4918,6 +5728,22 @@ 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 invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a tag for an Auto Scaling group. type TagDescription struct { _ struct{} `type:"structure"` @@ -4970,6 +5796,25 @@ func (s TerminateInstanceInAutoScalingGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateInstanceInAutoScalingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateInstanceInAutoScalingGroupInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.InstanceId != nil && len(*s.InstanceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1)) + } + if s.ShouldDecrementDesiredCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type TerminateInstanceInAutoScalingGroupOutput struct { _ struct{} `type:"structure"` @@ -5067,6 +5912,37 @@ func (s UpdateAutoScalingGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAutoScalingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAutoScalingGroupInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1)) + } + if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1)) + } + if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1)) + } + if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1)) + } + if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateAutoScalingGroupOutput struct { _ struct{} `type:"structure"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 7ace19458..a40c1f263 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -879,6 +879,19 @@ func (s CancelUpdateStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelUpdateStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelUpdateStackInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CancelUpdateStackOutput struct { _ struct{} `type:"structure"` } @@ -978,6 +991,22 @@ func (s ContinueUpdateRollbackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContinueUpdateRollbackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContinueUpdateRollbackInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a ContinueUpdateRollback action. type ContinueUpdateRollbackOutput struct { _ struct{} `type:"structure"` @@ -1098,6 +1127,40 @@ func (s CreateChangeSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateChangeSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateChangeSetInput"} + if s.ChangeSetName == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) + } + if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) + } + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) + } + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) + } + if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the CreateChangeSet action. type CreateChangeSetOutput struct { _ struct{} `type:"structure"` @@ -1238,6 +1301,34 @@ func (s CreateStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStackInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1)) + } + if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1)) + } + if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) + } + if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) + } + if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 1 { + invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a CreateStack action. type CreateStackOutput struct { _ struct{} `type:"structure"` @@ -1279,6 +1370,25 @@ func (s DeleteChangeSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteChangeSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteChangeSetInput"} + if s.ChangeSetName == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) + } + if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the DeleteChangeSet action. type DeleteChangeSetOutput struct { _ struct{} `type:"structure"` @@ -1320,6 +1430,19 @@ func (s DeleteStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStackInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteStackOutput struct { _ struct{} `type:"structure"` } @@ -1352,6 +1475,19 @@ func (s DescribeAccountLimitsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAccountLimitsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the DescribeAccountLimits action. type DescribeAccountLimitsOutput struct { _ struct{} `type:"structure"` @@ -1402,6 +1538,28 @@ func (s DescribeChangeSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeChangeSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeChangeSetInput"} + if s.ChangeSetName == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) + } + if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the DescribeChangeSet action. type DescribeChangeSetOutput struct { _ struct{} `type:"structure"` @@ -1495,6 +1653,19 @@ func (s DescribeStackEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStackEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStackEventsInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a DescribeStackEvents action. type DescribeStackEventsOutput struct { _ struct{} `type:"structure"` @@ -1545,6 +1716,22 @@ func (s DescribeStackResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStackResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceInput"} + if s.LogicalResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("LogicalResourceId")) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a DescribeStackResource action. type DescribeStackResourceOutput struct { _ struct{} `type:"structure"` @@ -1653,6 +1840,19 @@ func (s DescribeStacksInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStacksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStacksInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a DescribeStacks action. type DescribeStacksOutput struct { _ struct{} `type:"structure"` @@ -1710,6 +1910,22 @@ func (s EstimateTemplateCostInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EstimateTemplateCostInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EstimateTemplateCostInput"} + if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) + } + if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a EstimateTemplateCost action. type EstimateTemplateCostOutput struct { _ struct{} `type:"structure"` @@ -1752,6 +1968,25 @@ func (s ExecuteChangeSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExecuteChangeSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExecuteChangeSetInput"} + if s.ChangeSetName == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeSetName")) + } + if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1)) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the ExecuteChangeSet action. type ExecuteChangeSetOutput struct { _ struct{} `type:"structure"` @@ -1786,6 +2021,19 @@ func (s GetStackPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetStackPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStackPolicyInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the GetStackPolicy action. type GetStackPolicyOutput struct { _ struct{} `type:"structure"` @@ -1829,6 +2077,19 @@ func (s GetTemplateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTemplateInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for GetTemplate action. type GetTemplateOutput struct { _ struct{} `type:"structure"` @@ -1891,6 +2152,25 @@ func (s GetTemplateSummaryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTemplateSummaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTemplateSummaryInput"} + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) + } + if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the GetTemplateSummary action. type GetTemplateSummaryOutput struct { _ struct{} `type:"structure"` @@ -1958,6 +2238,25 @@ func (s ListChangeSetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListChangeSetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListChangeSetsInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the ListChangeSets action. type ListChangeSetsOutput struct { _ struct{} `type:"structure"` @@ -2008,6 +2307,22 @@ func (s ListStackResourcesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListStackResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListStackResourcesInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a ListStackResources action. type ListStackResourcesOutput struct { _ struct{} `type:"structure"` @@ -2053,6 +2368,19 @@ func (s ListStacksInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListStacksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListStacksInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for ListStacks action. type ListStacksOutput struct { _ struct{} `type:"structure"` @@ -2358,6 +2686,25 @@ func (s SetStackPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetStackPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetStackPolicyInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1)) + } + if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetStackPolicyOutput struct { _ struct{} `type:"structure"` } @@ -2405,6 +2752,34 @@ func (s SignalResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SignalResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SignalResourceInput"} + if s.LogicalResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("LogicalResourceId")) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + if s.UniqueId == nil { + invalidParams.Add(request.NewErrParamRequired("UniqueId")) + } + if s.UniqueId != nil && len(*s.UniqueId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UniqueId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SignalResourceOutput struct { _ struct{} `type:"structure"` } @@ -2878,6 +3253,37 @@ func (s UpdateStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateStackInput"} + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackPolicyBody != nil && len(*s.StackPolicyBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyBody", 1)) + } + if s.StackPolicyDuringUpdateBody != nil && len(*s.StackPolicyDuringUpdateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyDuringUpdateBody", 1)) + } + if s.StackPolicyDuringUpdateURL != nil && len(*s.StackPolicyDuringUpdateURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyDuringUpdateURL", 1)) + } + if s.StackPolicyURL != nil && len(*s.StackPolicyURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackPolicyURL", 1)) + } + if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) + } + if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for a UpdateStack action. type UpdateStackOutput struct { _ struct{} `type:"structure"` @@ -2929,6 +3335,22 @@ func (s ValidateTemplateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ValidateTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ValidateTemplateInput"} + if s.TemplateBody != nil && len(*s.TemplateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateBody", 1)) + } + if s.TemplateURL != nil && len(*s.TemplateURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateURL", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for ValidateTemplate action. type ValidateTemplateOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index cfdb35577..246909143 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -4,6 +4,7 @@ package cloudfront import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -722,6 +723,19 @@ func (s Aliases) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Aliases) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Aliases"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that controls which HTTP methods CloudFront processes and // forwards to your Amazon S3 bucket or your custom origin. There are three // choices: - CloudFront forwards only GET and HEAD requests. - CloudFront forwards @@ -761,6 +775,27 @@ func (s AllowedMethods) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllowedMethods) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.CachedMethods != nil { + if err := s.CachedMethods.Validate(); err != nil { + invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that describes how CloudFront processes requests. You can // create up to 10 cache behaviors.You must create at least as many cache behaviors // (including the default cache behavior) as you have origins if you want CloudFront @@ -885,6 +920,49 @@ func (s CacheBehavior) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CacheBehavior) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"} + if s.ForwardedValues == nil { + invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) + } + if s.MinTTL == nil { + invalidParams.Add(request.NewErrParamRequired("MinTTL")) + } + if s.PathPattern == nil { + invalidParams.Add(request.NewErrParamRequired("PathPattern")) + } + if s.TargetOriginId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) + } + if s.TrustedSigners == nil { + invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) + } + if s.ViewerProtocolPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) + } + if s.AllowedMethods != nil { + if err := s.AllowedMethods.Validate(); err != nil { + invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) + } + } + if s.ForwardedValues != nil { + if err := s.ForwardedValues.Validate(); err != nil { + invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) + } + } + if s.TrustedSigners != nil { + if err := s.TrustedSigners.Validate(); err != nil { + invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains zero or more CacheBehavior elements. type CacheBehaviors struct { _ struct{} `type:"structure"` @@ -907,6 +985,29 @@ func (s CacheBehaviors) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CacheBehaviors) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that controls whether CloudFront caches the response to requests // using the specified HTTP methods. There are two choices: - CloudFront caches // responses to GET and HEAD requests. - CloudFront caches responses to GET, @@ -936,6 +1037,22 @@ func (s CachedMethods) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CachedMethods) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CachedMethods"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that specifies the whitelisted cookies, if any, that you want // CloudFront to forward to your origin that is associated with this cache behavior. type CookieNames struct { @@ -959,6 +1076,19 @@ func (s CookieNames) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CookieNames) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CookieNames"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that specifies the cookie preferences associated with this // cache behavior. type CookiePreference struct { @@ -985,6 +1115,24 @@ func (s CookiePreference) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CookiePreference) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CookiePreference"} + if s.Forward == nil { + invalidParams.Add(request.NewErrParamRequired("Forward")) + } + if s.WhitelistedNames != nil { + if err := s.WhitelistedNames.Validate(); err != nil { + invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The request to create a new origin access identity. type CreateCloudFrontOriginAccessIdentityInput struct { _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` @@ -1003,6 +1151,24 @@ func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"} + if s.CloudFrontOriginAccessIdentityConfig == nil { + invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) + } + if s.CloudFrontOriginAccessIdentityConfig != nil { + if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { + invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type CreateCloudFrontOriginAccessIdentityOutput struct { _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` @@ -1046,6 +1212,24 @@ func (s CreateDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"} + if s.DistributionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) + } + if s.DistributionConfig != nil { + if err := s.DistributionConfig.Validate(); err != nil { + invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type CreateDistributionOutput struct { _ struct{} `type:"structure" payload:"Distribution"` @@ -1092,6 +1276,27 @@ func (s CreateInvalidationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInvalidationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"} + if s.DistributionId == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionId")) + } + if s.InvalidationBatch == nil { + invalidParams.Add(request.NewErrParamRequired("InvalidationBatch")) + } + if s.InvalidationBatch != nil { + if err := s.InvalidationBatch.Validate(); err != nil { + invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type CreateInvalidationOutput struct { _ struct{} `type:"structure" payload:"Invalidation"` @@ -1132,6 +1337,24 @@ func (s CreateStreamingDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStreamingDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"} + if s.StreamingDistributionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) + } + if s.StreamingDistributionConfig != nil { + if err := s.StreamingDistributionConfig.Validate(); err != nil { + invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type CreateStreamingDistributionOutput struct { _ struct{} `type:"structure" payload:"StreamingDistribution"` @@ -1204,6 +1427,19 @@ func (s CustomErrorResponse) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomErrorResponse) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"} + if s.ErrorCode == nil { + invalidParams.Add(request.NewErrParamRequired("ErrorCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains zero or more CustomErrorResponse elements. type CustomErrorResponses struct { _ struct{} `type:"structure"` @@ -1226,6 +1462,29 @@ func (s CustomErrorResponses) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomErrorResponses) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the list of Custom Headers for each origin. type CustomHeaders struct { _ struct{} `type:"structure"` @@ -1247,6 +1506,29 @@ func (s CustomHeaders) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomHeaders) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A customer origin. type CustomOriginConfig struct { _ struct{} `type:"structure"` @@ -1275,6 +1557,30 @@ func (s CustomOriginConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomOriginConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"} + if s.HTTPPort == nil { + invalidParams.Add(request.NewErrParamRequired("HTTPPort")) + } + if s.HTTPSPort == nil { + invalidParams.Add(request.NewErrParamRequired("HTTPSPort")) + } + if s.OriginProtocolPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy")) + } + if s.OriginSslProtocols != nil { + if err := s.OriginSslProtocols.Validate(); err != nil { + invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that describes the default cache behavior if you do not specify // a CacheBehavior element or if files don't match any of the values of PathPattern // in CacheBehavior elements.You must create exactly one default cache behavior. @@ -1379,6 +1685,46 @@ func (s DefaultCacheBehavior) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DefaultCacheBehavior) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"} + if s.ForwardedValues == nil { + invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) + } + if s.MinTTL == nil { + invalidParams.Add(request.NewErrParamRequired("MinTTL")) + } + if s.TargetOriginId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) + } + if s.TrustedSigners == nil { + invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) + } + if s.ViewerProtocolPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) + } + if s.AllowedMethods != nil { + if err := s.AllowedMethods.Validate(); err != nil { + invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) + } + } + if s.ForwardedValues != nil { + if err := s.ForwardedValues.Validate(); err != nil { + invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) + } + } + if s.TrustedSigners != nil { + if err := s.TrustedSigners.Validate(); err != nil { + invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The request to delete a origin access identity. type DeleteCloudFrontOriginAccessIdentityInput struct { _ struct{} `type:"structure"` @@ -1401,6 +1747,19 @@ func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteCloudFrontOriginAccessIdentityOutput struct { _ struct{} `type:"structure"` } @@ -1437,6 +1796,19 @@ func (s DeleteDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDistributionOutput struct { _ struct{} `type:"structure"` } @@ -1473,6 +1845,19 @@ func (s DeleteStreamingDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteStreamingDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteStreamingDistributionOutput struct { _ struct{} `type:"structure"` } @@ -1611,6 +1996,66 @@ func (s DistributionConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DistributionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.Comment == nil { + invalidParams.Add(request.NewErrParamRequired("Comment")) + } + if s.DefaultCacheBehavior == nil { + invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior")) + } + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.Origins == nil { + invalidParams.Add(request.NewErrParamRequired("Origins")) + } + if s.Aliases != nil { + if err := s.Aliases.Validate(); err != nil { + invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) + } + } + if s.CacheBehaviors != nil { + if err := s.CacheBehaviors.Validate(); err != nil { + invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams)) + } + } + if s.CustomErrorResponses != nil { + if err := s.CustomErrorResponses.Validate(); err != nil { + invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams)) + } + } + if s.DefaultCacheBehavior != nil { + if err := s.DefaultCacheBehavior.Validate(); err != nil { + invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams)) + } + } + if s.Logging != nil { + if err := s.Logging.Validate(); err != nil { + invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) + } + } + if s.Origins != nil { + if err := s.Origins.Validate(); err != nil { + invalidParams.AddNested("Origins", err.(request.ErrInvalidParams)) + } + } + if s.Restrictions != nil { + if err := s.Restrictions.Validate(); err != nil { + invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A distribution list. type DistributionList struct { _ struct{} `type:"structure"` @@ -1744,6 +2189,32 @@ func (s ForwardedValues) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ForwardedValues) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"} + if s.Cookies == nil { + invalidParams.Add(request.NewErrParamRequired("Cookies")) + } + if s.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + if s.Cookies != nil { + if err := s.Cookies.Validate(); err != nil { + invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams)) + } + } + if s.Headers != nil { + if err := s.Headers.Validate(); err != nil { + invalidParams.AddNested("Headers", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that controls the countries in which your content is distributed. // For more information about geo restriction, go to Customizing Error Responses // in the Amazon CloudFront Developer Guide. CloudFront determines the location @@ -1788,6 +2259,22 @@ func (s GeoRestriction) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GeoRestriction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.RestrictionType == nil { + invalidParams.Add(request.NewErrParamRequired("RestrictionType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The request to get an origin access identity's configuration. type GetCloudFrontOriginAccessIdentityConfigInput struct { _ struct{} `type:"structure"` @@ -1806,6 +2293,19 @@ func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type GetCloudFrontOriginAccessIdentityConfigOutput struct { _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` @@ -1845,6 +2345,19 @@ func (s GetCloudFrontOriginAccessIdentityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type GetCloudFrontOriginAccessIdentityOutput struct { _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` @@ -1885,6 +2398,19 @@ func (s GetDistributionConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDistributionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type GetDistributionConfigOutput struct { _ struct{} `type:"structure" payload:"DistributionConfig"` @@ -1924,6 +2450,19 @@ func (s GetDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type GetDistributionOutput struct { _ struct{} `type:"structure" payload:"Distribution"` @@ -1966,6 +2505,22 @@ func (s GetInvalidationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetInvalidationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"} + if s.DistributionId == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type GetInvalidationOutput struct { _ struct{} `type:"structure" payload:"Invalidation"` @@ -2002,6 +2557,19 @@ func (s GetStreamingDistributionConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetStreamingDistributionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type GetStreamingDistributionConfigOutput struct { _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` @@ -2041,6 +2609,19 @@ func (s GetStreamingDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetStreamingDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type GetStreamingDistributionOutput struct { _ struct{} `type:"structure" payload:"StreamingDistribution"` @@ -2099,6 +2680,19 @@ func (s Headers) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Headers) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Headers"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // An invalidation. type Invalidation struct { _ struct{} `type:"structure"` @@ -2161,6 +2755,27 @@ func (s InvalidationBatch) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InvalidationBatch) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.Paths == nil { + invalidParams.Add(request.NewErrParamRequired("Paths")) + } + if s.Paths != nil { + if err := s.Paths.Validate(); err != nil { + invalidParams.AddNested("Paths", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // An invalidation list. type InvalidationList struct { _ struct{} `type:"structure"` @@ -2321,6 +2936,19 @@ func (s ListDistributionsByWebACLIdInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDistributionsByWebACLIdInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"} + if s.WebACLId == nil { + invalidParams.Add(request.NewErrParamRequired("WebACLId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The response to a request to list the distributions that are associated with // a specified AWS WAF web ACL. type ListDistributionsByWebACLIdOutput struct { @@ -2414,6 +3042,19 @@ func (s ListInvalidationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInvalidationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"} + if s.DistributionId == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type ListInvalidationsOutput struct { _ struct{} `type:"structure" payload:"InvalidationList"` @@ -2515,6 +3156,28 @@ func (s LoggingConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoggingConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.IncludeCookies == nil { + invalidParams.Add(request.NewErrParamRequired("IncludeCookies")) + } + if s.Prefix == nil { + invalidParams.Add(request.NewErrParamRequired("Prefix")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that describes the Amazon S3 bucket or the HTTP server (for // example, a web server) from which CloudFront gets your files.You must create // at least one origin. @@ -2562,6 +3225,37 @@ func (s Origin) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Origin) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Origin"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.CustomHeaders != nil { + if err := s.CustomHeaders.Validate(); err != nil { + invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams)) + } + } + if s.CustomOriginConfig != nil { + if err := s.CustomOriginConfig.Validate(); err != nil { + invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams)) + } + } + if s.S3OriginConfig != nil { + if err := s.S3OriginConfig.Validate(); err != nil { + invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // CloudFront origin access identity. type OriginAccessIdentity struct { _ struct{} `type:"structure"` @@ -2619,6 +3313,22 @@ func (s OriginAccessIdentityConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginAccessIdentityConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.Comment == nil { + invalidParams.Add(request.NewErrParamRequired("Comment")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The CloudFrontOriginAccessIdentityList type. type OriginAccessIdentityList struct { _ struct{} `type:"structure"` @@ -2707,6 +3417,22 @@ func (s OriginCustomHeader) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginCustomHeader) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"} + if s.HeaderName == nil { + invalidParams.Add(request.NewErrParamRequired("HeaderName")) + } + if s.HeaderValue == nil { + invalidParams.Add(request.NewErrParamRequired("HeaderValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the list of SSL/TLS protocols that you want // CloudFront to use when communicating with your origin over HTTPS. type OriginSslProtocols struct { @@ -2732,6 +3458,22 @@ func (s OriginSslProtocols) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginSslProtocols) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about origins for this distribution. type Origins struct { _ struct{} `type:"structure"` @@ -2753,6 +3495,32 @@ func (s Origins) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Origins) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Origins"} + if s.Items != nil && len(s.Items) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Items", 1)) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the objects that you want // to invalidate. type Paths struct { @@ -2775,6 +3543,19 @@ func (s Paths) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Paths) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Paths"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that identifies ways in which you want to restrict distribution // of your content. type Restrictions struct { @@ -2799,6 +3580,24 @@ func (s Restrictions) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Restrictions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Restrictions"} + if s.GeoRestriction == nil { + invalidParams.Add(request.NewErrParamRequired("GeoRestriction")) + } + if s.GeoRestriction != nil { + if err := s.GeoRestriction.Validate(); err != nil { + invalidParams.AddNested("GeoRestriction", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the Amazon S3 bucket from // which you want CloudFront to get your media files for distribution. type S3Origin struct { @@ -2821,6 +3620,22 @@ func (s S3Origin) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Origin) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Origin"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.OriginAccessIdentity == nil { + invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the Amazon S3 origin. If the // origin is a custom origin, use the CustomOriginConfig element instead. type S3OriginConfig struct { @@ -2850,6 +3665,19 @@ func (s S3OriginConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3OriginConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3OriginConfig"} + if s.OriginAccessIdentity == nil { + invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that lists the AWS accounts that were included in the TrustedSigners // complex type, as well as their active CloudFront key pair IDs, if any. type Signer struct { @@ -2982,6 +3810,51 @@ func (s StreamingDistributionConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StreamingDistributionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfig"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.Comment == nil { + invalidParams.Add(request.NewErrParamRequired("Comment")) + } + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.S3Origin == nil { + invalidParams.Add(request.NewErrParamRequired("S3Origin")) + } + if s.TrustedSigners == nil { + invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) + } + if s.Aliases != nil { + if err := s.Aliases.Validate(); err != nil { + invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) + } + } + if s.Logging != nil { + if err := s.Logging.Validate(); err != nil { + invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) + } + } + if s.S3Origin != nil { + if err := s.S3Origin.Validate(); err != nil { + invalidParams.AddNested("S3Origin", err.(request.ErrInvalidParams)) + } + } + if s.TrustedSigners != nil { + if err := s.TrustedSigners.Validate(); err != nil { + invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A streaming distribution list. type StreamingDistributionList struct { _ struct{} `type:"structure"` @@ -3113,6 +3986,25 @@ func (s StreamingLoggingConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StreamingLoggingConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StreamingLoggingConfig"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.Prefix == nil { + invalidParams.Add(request.NewErrParamRequired("Prefix")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that specifies the AWS accounts, if any, that you want to // allow to create signed URLs for private content. If you want to require signed // URLs in requests for objects in the target origin that match the PathPattern @@ -3149,6 +4041,22 @@ func (s TrustedSigners) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TrustedSigners) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TrustedSigners"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The request to update an origin access identity. type UpdateCloudFrontOriginAccessIdentityInput struct { _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` @@ -3174,6 +4082,27 @@ func (s UpdateCloudFrontOriginAccessIdentityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCloudFrontOriginAccessIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCloudFrontOriginAccessIdentityInput"} + if s.CloudFrontOriginAccessIdentityConfig == nil { + invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.CloudFrontOriginAccessIdentityConfig != nil { + if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { + invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type UpdateCloudFrontOriginAccessIdentityOutput struct { _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` @@ -3220,6 +4149,27 @@ func (s UpdateDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDistributionInput"} + if s.DistributionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.DistributionConfig != nil { + if err := s.DistributionConfig.Validate(); err != nil { + invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type UpdateDistributionOutput struct { _ struct{} `type:"structure" payload:"Distribution"` @@ -3266,6 +4216,27 @@ func (s UpdateStreamingDistributionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateStreamingDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateStreamingDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.StreamingDistributionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) + } + if s.StreamingDistributionConfig != nil { + if err := s.StreamingDistributionConfig.Validate(); err != nil { + invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The returned result of the corresponding request. type UpdateStreamingDistributionOutput struct { _ struct{} `type:"structure" payload:"StreamingDistribution"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index 1c566df4c..7fc320b74 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -4,6 +4,7 @@ package cloudtrail import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -408,6 +409,29 @@ func (s AddTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagsList != nil { + for i, v := range s.TagsList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type AddTagsOutput struct { @@ -503,6 +527,22 @@ func (s CreateTrailInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.S3BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("S3BucketName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type CreateTrailOutput struct { @@ -581,6 +621,19 @@ func (s DeleteTrailInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type DeleteTrailOutput struct { @@ -706,6 +759,19 @@ func (s GetTrailStatusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTrailStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type GetTrailStatusOutput struct { @@ -871,6 +937,19 @@ func (s ListTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.ResourceIdList == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIdList")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type ListTagsOutput struct { @@ -914,6 +993,22 @@ func (s LookupAttribute) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LookupAttribute) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"} + if s.AttributeKey == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeKey")) + } + if s.AttributeValue == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains a request for LookupEvents. type LookupEventsInput struct { _ struct{} `type:"structure"` @@ -954,6 +1049,29 @@ func (s LookupEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LookupEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.LookupAttributes != nil { + for i, v := range s.LookupAttributes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains a response to a LookupEvents action. type LookupEventsOutput struct { _ struct{} `type:"structure"` @@ -1032,6 +1150,29 @@ func (s RemoveTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagsList != nil { + for i, v := range s.TagsList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type RemoveTagsOutput struct { @@ -1116,6 +1257,19 @@ func (s StartLoggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartLoggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type StartLoggingOutput struct { @@ -1152,6 +1306,19 @@ func (s StopLoggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopLoggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type StopLoggingOutput struct { @@ -1191,6 +1358,19 @@ 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 invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The settings for a trail. type Trail struct { _ struct{} `type:"structure"` @@ -1338,6 +1518,19 @@ func (s UpdateTrailInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTrailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the objects or data listed below if successful. Otherwise, returns // an error. type UpdateTrailOutput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go index 8115cfc7a..e36887cc1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go @@ -4,6 +4,7 @@ package cloudwatch import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -546,6 +547,19 @@ func (s DeleteAlarmsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAlarmsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAlarmsInput"} + if s.AlarmNames == nil { + invalidParams.Add(request.NewErrParamRequired("AlarmNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAlarmsOutput struct { _ struct{} `type:"structure"` } @@ -593,6 +607,22 @@ func (s DescribeAlarmHistoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAlarmHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmHistoryInput"} + if s.AlarmName != nil && len(*s.AlarmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) + } + if s.MaxRecords != nil && *s.MaxRecords < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the DescribeAlarmHistory action. type DescribeAlarmHistoryOutput struct { _ struct{} `type:"structure"` @@ -648,6 +678,41 @@ func (s DescribeAlarmsForMetricInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAlarmsForMetricInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsForMetricInput"} + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } + if s.Namespace == nil { + invalidParams.Add(request.NewErrParamRequired("Namespace")) + } + if s.Namespace != nil && len(*s.Namespace) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) + } + if s.Period != nil && *s.Period < 60 { + invalidParams.Add(request.NewErrParamMinValue("Period", 60)) + } + if s.Dimensions != nil { + for i, v := range s.Dimensions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the DescribeAlarmsForMetric action. type DescribeAlarmsForMetricOutput struct { _ struct{} `type:"structure"` @@ -700,6 +765,25 @@ func (s DescribeAlarmsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAlarmsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAlarmsInput"} + if s.ActionPrefix != nil && len(*s.ActionPrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ActionPrefix", 1)) + } + if s.AlarmNamePrefix != nil && len(*s.AlarmNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlarmNamePrefix", 1)) + } + if s.MaxRecords != nil && *s.MaxRecords < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the DescribeAlarms action. type DescribeAlarmsOutput struct { _ struct{} `type:"structure"` @@ -745,6 +829,28 @@ func (s Dimension) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Dimension) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Dimension"} + 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.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The DimensionFilter data type is used to filter ListMetrics results. type DimensionFilter struct { _ struct{} `type:"structure"` @@ -769,6 +875,25 @@ func (s DimensionFilter) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DimensionFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DimensionFilter"} + 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.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableAlarmActionsInput struct { _ struct{} `type:"structure"` @@ -786,6 +911,19 @@ func (s DisableAlarmActionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableAlarmActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableAlarmActionsInput"} + if s.AlarmNames == nil { + invalidParams.Add(request.NewErrParamRequired("AlarmNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableAlarmActionsOutput struct { _ struct{} `type:"structure"` } @@ -817,6 +955,19 @@ func (s EnableAlarmActionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableAlarmActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableAlarmActionsInput"} + if s.AlarmNames == nil { + invalidParams.Add(request.NewErrParamRequired("AlarmNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableAlarmActionsOutput struct { _ struct{} `type:"structure"` } @@ -883,6 +1034,56 @@ func (s GetMetricStatisticsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetMetricStatisticsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetMetricStatisticsInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } + if s.Namespace == nil { + invalidParams.Add(request.NewErrParamRequired("Namespace")) + } + if s.Namespace != nil && len(*s.Namespace) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) + } + if s.Period == nil { + invalidParams.Add(request.NewErrParamRequired("Period")) + } + if s.Period != nil && *s.Period < 60 { + invalidParams.Add(request.NewErrParamMinValue("Period", 60)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + if s.Statistics == nil { + invalidParams.Add(request.NewErrParamRequired("Statistics")) + } + if s.Statistics != nil && len(s.Statistics) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Statistics", 1)) + } + if s.Dimensions != nil { + for i, v := range s.Dimensions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the GetMetricStatistics action. type GetMetricStatisticsOutput struct { _ struct{} `type:"structure"` @@ -931,6 +1132,32 @@ func (s ListMetricsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMetricsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMetricsInput"} + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } + if s.Namespace != nil && len(*s.Namespace) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) + } + if s.Dimensions != nil { + for i, v := range s.Dimensions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The output for the ListMetrics action. type ListMetricsOutput struct { _ struct{} `type:"structure"` @@ -1115,6 +1342,37 @@ func (s MetricDatum) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricDatum) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricDatum"} + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } + if s.Dimensions != nil { + for i, v := range s.Dimensions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.StatisticValues != nil { + if err := s.StatisticValues.Validate(); err != nil { + invalidParams.AddNested("StatisticValues", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutMetricAlarmInput struct { _ struct{} `type:"structure"` @@ -1228,6 +1486,65 @@ func (s PutMetricAlarmInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutMetricAlarmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutMetricAlarmInput"} + if s.AlarmName == nil { + invalidParams.Add(request.NewErrParamRequired("AlarmName")) + } + if s.AlarmName != nil && len(*s.AlarmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) + } + if s.ComparisonOperator == nil { + invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) + } + if s.EvaluationPeriods == nil { + invalidParams.Add(request.NewErrParamRequired("EvaluationPeriods")) + } + if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 { + invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1)) + } + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } + if s.Namespace == nil { + invalidParams.Add(request.NewErrParamRequired("Namespace")) + } + if s.Namespace != nil && len(*s.Namespace) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) + } + if s.Period == nil { + invalidParams.Add(request.NewErrParamRequired("Period")) + } + if s.Period != nil && *s.Period < 60 { + invalidParams.Add(request.NewErrParamMinValue("Period", 60)) + } + if s.Statistic == nil { + invalidParams.Add(request.NewErrParamRequired("Statistic")) + } + if s.Threshold == nil { + invalidParams.Add(request.NewErrParamRequired("Threshold")) + } + if s.Dimensions != nil { + for i, v := range s.Dimensions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutMetricAlarmOutput struct { _ struct{} `type:"structure"` } @@ -1266,6 +1583,35 @@ func (s PutMetricDataInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutMetricDataInput"} + if s.MetricData == nil { + invalidParams.Add(request.NewErrParamRequired("MetricData")) + } + if s.Namespace == nil { + invalidParams.Add(request.NewErrParamRequired("Namespace")) + } + if s.Namespace != nil && len(*s.Namespace) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) + } + if s.MetricData != nil { + for i, v := range s.MetricData { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricData", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutMetricDataOutput struct { _ struct{} `type:"structure"` } @@ -1309,6 +1655,28 @@ func (s SetAlarmStateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetAlarmStateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetAlarmStateInput"} + if s.AlarmName == nil { + invalidParams.Add(request.NewErrParamRequired("AlarmName")) + } + if s.AlarmName != nil && len(*s.AlarmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) + } + if s.StateReason == nil { + invalidParams.Add(request.NewErrParamRequired("StateReason")) + } + if s.StateValue == nil { + invalidParams.Add(request.NewErrParamRequired("StateValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetAlarmStateOutput struct { _ struct{} `type:"structure"` } @@ -1351,6 +1719,28 @@ func (s StatisticSet) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StatisticSet) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StatisticSet"} + if s.Maximum == nil { + invalidParams.Add(request.NewErrParamRequired("Maximum")) + } + if s.Minimum == nil { + invalidParams.Add(request.NewErrParamRequired("Minimum")) + } + if s.SampleCount == nil { + invalidParams.Add(request.NewErrParamRequired("SampleCount")) + } + if s.Sum == nil { + invalidParams.Add(request.NewErrParamRequired("Sum")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + const ( // @enum ComparisonOperator ComparisonOperatorGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 157cd82aa..bd35b89e8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -4,6 +4,7 @@ package cloudwatchevents import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -435,6 +436,22 @@ func (s DeleteRuleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} + 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 +} + type DeleteRuleOutput struct { _ struct{} `type:"structure"` } @@ -467,6 +484,22 @@ func (s DescribeRuleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRuleInput"} + 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 +} + // The result of the DescribeRule operation. type DescribeRuleOutput struct { _ struct{} `type:"structure"` @@ -521,6 +554,22 @@ func (s DisableRuleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableRuleInput"} + 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 +} + type DisableRuleOutput struct { _ struct{} `type:"structure"` } @@ -553,6 +602,22 @@ func (s EnableRuleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableRuleInput"} + 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 +} + type EnableRuleOutput struct { _ struct{} `type:"structure"` } @@ -593,6 +658,28 @@ func (s ListRuleNamesByTargetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRuleNamesByTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRuleNamesByTargetInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.TargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("TargetArn")) + } + if s.TargetArn != nil && len(*s.TargetArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the ListRuleNamesByTarget operation. type ListRuleNamesByTargetOutput struct { _ struct{} `type:"structure"` @@ -639,6 +726,25 @@ func (s ListRulesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the ListRules operation. type ListRulesOutput struct { _ struct{} `type:"structure"` @@ -685,6 +791,28 @@ func (s ListTargetsByRuleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTargetsByRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTargetsByRuleInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.Rule == nil { + invalidParams.Add(request.NewErrParamRequired("Rule")) + } + if s.Rule != nil && len(*s.Rule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the ListTargetsByRule operation. type ListTargetsByRuleOutput struct { _ struct{} `type:"structure"` @@ -726,6 +854,22 @@ func (s PutEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventsInput"} + if s.Entries == nil { + invalidParams.Add(request.NewErrParamRequired("Entries")) + } + if s.Entries != nil && len(s.Entries) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the PutEvents operation. type PutEventsOutput struct { _ struct{} `type:"structure"` @@ -841,6 +985,25 @@ func (s PutRuleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRuleInput"} + 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.RoleArn != nil && len(*s.RoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the PutRule operation. type PutRuleOutput struct { _ struct{} `type:"structure"` @@ -880,6 +1043,35 @@ func (s PutTargetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutTargetsInput"} + if s.Rule == nil { + invalidParams.Add(request.NewErrParamRequired("Rule")) + } + if s.Rule != nil && len(*s.Rule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) + } + if s.Targets == nil { + invalidParams.Add(request.NewErrParamRequired("Targets")) + } + if s.Targets != nil { + for i, v := range s.Targets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the PutTargets operation. type PutTargetsOutput struct { _ struct{} `type:"structure"` @@ -946,6 +1138,28 @@ func (s RemoveTargetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTargetsInput"} + if s.Ids == nil { + invalidParams.Add(request.NewErrParamRequired("Ids")) + } + if s.Ids != nil && len(s.Ids) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Ids", 1)) + } + if s.Rule == nil { + invalidParams.Add(request.NewErrParamRequired("Rule")) + } + if s.Rule != nil && len(*s.Rule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the RemoveTargets operation. type RemoveTargetsOutput struct { _ struct{} `type:"structure"` @@ -1071,6 +1285,28 @@ func (s Target) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Target) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Target"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Container for the parameters to the TestEventPattern operation. type TestEventPatternInput struct { _ struct{} `type:"structure"` @@ -1092,6 +1328,22 @@ func (s TestEventPatternInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestEventPatternInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestEventPatternInput"} + if s.Event == nil { + invalidParams.Add(request.NewErrParamRequired("Event")) + } + if s.EventPattern == nil { + invalidParams.Add(request.NewErrParamRequired("EventPattern")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of the TestEventPattern operation. type TestEventPatternOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index 6a5f99cee..d5be83323 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -4,6 +4,8 @@ package cloudwatchlogs import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" @@ -968,6 +970,22 @@ func (s CancelExportTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CancelExportTaskOutput struct { _ struct{} `type:"structure"` } @@ -1025,6 +1043,40 @@ func (s CreateExportTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.Destination != nil && len(*s.Destination) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Destination", 1)) + } + if s.From == nil { + invalidParams.Add(request.NewErrParamRequired("From")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } + if s.TaskName != nil && len(*s.TaskName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskName", 1)) + } + if s.To == nil { + invalidParams.Add(request.NewErrParamRequired("To")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateExportTaskOutput struct { _ struct{} `type:"structure"` @@ -1059,6 +1111,22 @@ func (s CreateLogGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLogGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateLogGroupOutput struct { _ struct{} `type:"structure"` } @@ -1093,6 +1161,28 @@ func (s CreateLogStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLogStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateLogStreamOutput struct { _ struct{} `type:"structure"` } @@ -1124,6 +1214,22 @@ func (s DeleteDestinationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"} + if s.DestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationName")) + } + if s.DestinationName != nil && len(*s.DestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDestinationOutput struct { _ struct{} `type:"structure"` } @@ -1155,6 +1261,22 @@ func (s DeleteLogGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLogGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLogGroupOutput struct { _ struct{} `type:"structure"` } @@ -1189,6 +1311,28 @@ func (s DeleteLogStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLogStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLogStreamOutput struct { _ struct{} `type:"structure"` } @@ -1223,6 +1367,28 @@ func (s DeleteMetricFilterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMetricFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"} + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteMetricFilterOutput struct { _ struct{} `type:"structure"` } @@ -1255,6 +1421,22 @@ func (s DeleteRetentionPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRetentionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRetentionPolicyOutput struct { _ struct{} `type:"structure"` } @@ -1290,6 +1472,28 @@ func (s DeleteSubscriptionFilterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSubscriptionFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"} + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSubscriptionFilterOutput struct { _ struct{} `type:"structure"` } @@ -1330,6 +1534,25 @@ func (s DescribeDestinationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDestinationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"} + if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeDestinationsOutput struct { _ struct{} `type:"structure"` @@ -1382,6 +1605,25 @@ func (s DescribeExportTasksInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeExportTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeExportTasksOutput struct { _ struct{} `type:"structure"` @@ -1431,6 +1673,25 @@ func (s DescribeLogGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLogGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeLogGroupsOutput struct { _ struct{} `type:"structure"` @@ -1493,6 +1754,31 @@ func (s DescribeLogStreamsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLogStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeLogStreamsOutput struct { _ struct{} `type:"structure"` @@ -1545,6 +1831,31 @@ func (s DescribeMetricFiltersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMetricFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"} + if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeMetricFiltersOutput struct { _ struct{} `type:"structure"` @@ -1595,6 +1906,31 @@ func (s DescribeSubscriptionFiltersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSubscriptionFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"} + if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeSubscriptionFiltersOutput struct { _ struct{} `type:"structure"` @@ -1788,6 +2124,31 @@ func (s FilterLogEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *FilterLogEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type FilterLogEventsOutput struct { _ struct{} `type:"structure"` @@ -1890,6 +2251,34 @@ func (s GetLogEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLogEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLogEventsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetLogEventsOutput struct { _ struct{} `type:"structure"` @@ -1940,6 +2329,25 @@ func (s InputLogEvent) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputLogEvent) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputLogEvent"} + if s.Message == nil { + invalidParams.Add(request.NewErrParamRequired("Message")) + } + if s.Message != nil && len(*s.Message) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Message", 1)) + } + if s.Timestamp == nil { + invalidParams.Add(request.NewErrParamRequired("Timestamp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type LogGroup struct { _ struct{} `type:"structure"` @@ -2093,6 +2501,25 @@ func (s MetricTransformation) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricTransformation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"} + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.MetricNamespace == nil { + invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) + } + if s.MetricValue == nil { + invalidParams.Add(request.NewErrParamRequired("MetricValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type OutputLogEvent struct { _ struct{} `type:"structure"` @@ -2141,6 +2568,34 @@ func (s PutDestinationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDestinationInput"} + if s.DestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationName")) + } + if s.DestinationName != nil && len(*s.DestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) + } + if s.TargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("TargetArn")) + } + if s.TargetArn != nil && len(*s.TargetArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutDestinationOutput struct { _ struct{} `type:"structure"` @@ -2179,6 +2634,28 @@ func (s PutDestinationPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutDestinationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDestinationPolicyInput"} + if s.AccessPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("AccessPolicy")) + } + if s.AccessPolicy != nil && len(*s.AccessPolicy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccessPolicy", 1)) + } + if s.DestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationName")) + } + if s.DestinationName != nil && len(*s.DestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutDestinationPolicyOutput struct { _ struct{} `type:"structure"` } @@ -2220,6 +2697,47 @@ func (s PutLogEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutLogEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutLogEventsInput"} + if s.LogEvents == nil { + invalidParams.Add(request.NewErrParamRequired("LogEvents")) + } + if s.LogEvents != nil && len(s.LogEvents) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogEvents", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + } + if s.SequenceToken != nil && len(*s.SequenceToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SequenceToken", 1)) + } + if s.LogEvents != nil { + for i, v := range s.LogEvents { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LogEvents", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutLogEventsOutput struct { _ struct{} `type:"structure"` @@ -2268,6 +2786,47 @@ func (s PutMetricFilterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutMetricFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutMetricFilterInput"} + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } + if s.FilterPattern == nil { + invalidParams.Add(request.NewErrParamRequired("FilterPattern")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.MetricTransformations == nil { + invalidParams.Add(request.NewErrParamRequired("MetricTransformations")) + } + if s.MetricTransformations != nil && len(s.MetricTransformations) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricTransformations", 1)) + } + if s.MetricTransformations != nil { + for i, v := range s.MetricTransformations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricTransformations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutMetricFilterOutput struct { _ struct{} `type:"structure"` } @@ -2304,6 +2863,25 @@ func (s PutRetentionPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRetentionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRetentionPolicyInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.RetentionInDays == nil { + invalidParams.Add(request.NewErrParamRequired("RetentionInDays")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutRetentionPolicyOutput struct { _ struct{} `type:"structure"` } @@ -2358,6 +2936,40 @@ func (s PutSubscriptionFilterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutSubscriptionFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutSubscriptionFilterInput"} + if s.DestinationArn == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationArn")) + } + if s.DestinationArn != nil && len(*s.DestinationArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationArn", 1)) + } + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } + if s.FilterPattern == nil { + invalidParams.Add(request.NewErrParamRequired("FilterPattern")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.RoleArn != nil && len(*s.RoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutSubscriptionFilterOutput struct { _ struct{} `type:"structure"` } @@ -2471,6 +3083,25 @@ func (s TestMetricFilterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestMetricFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestMetricFilterInput"} + if s.FilterPattern == nil { + invalidParams.Add(request.NewErrParamRequired("FilterPattern")) + } + if s.LogEventMessages == nil { + invalidParams.Add(request.NewErrParamRequired("LogEventMessages")) + } + if s.LogEventMessages != nil && len(s.LogEventMessages) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogEventMessages", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type TestMetricFilterOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index 74cc04c2c..88d3a006c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -512,6 +512,19 @@ func (s BatchGetRepositoriesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetRepositoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetRepositoriesInput"} + if s.RepositoryNames == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a batch get repositories operation. type BatchGetRepositoriesOutput struct { _ struct{} `type:"structure"` @@ -614,6 +627,31 @@ func (s CreateBranchInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBranchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBranchInput"} + if s.BranchName == nil { + invalidParams.Add(request.NewErrParamRequired("BranchName")) + } + if s.BranchName != nil && len(*s.BranchName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) + } + if s.CommitId == nil { + invalidParams.Add(request.NewErrParamRequired("CommitId")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateBranchOutput struct { _ struct{} `type:"structure"` } @@ -661,6 +699,22 @@ func (s CreateRepositoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a create repository operation. type CreateRepositoryOutput struct { _ struct{} `type:"structure"` @@ -697,6 +751,22 @@ func (s DeleteRepositoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a delete repository operation. type DeleteRepositoryOutput struct { _ struct{} `type:"structure"` @@ -737,6 +807,22 @@ func (s GetBranchInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBranchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBranchInput"} + if s.BranchName != nil && len(*s.BranchName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get branch operation. type GetBranchOutput struct { _ struct{} `type:"structure"` @@ -776,6 +862,25 @@ func (s GetCommitInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCommitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"} + if s.CommitId == nil { + invalidParams.Add(request.NewErrParamRequired("CommitId")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get commit operation. type GetCommitOutput struct { _ struct{} `type:"structure"` @@ -812,6 +917,22 @@ func (s GetRepositoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRepositoryInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get repository operation. type GetRepositoryOutput struct { _ struct{} `type:"structure"` @@ -848,6 +969,19 @@ func (s GetRepositoryTriggersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRepositoryTriggersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRepositoryTriggersInput"} + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get repository triggers operation. type GetRepositoryTriggersOutput struct { _ struct{} `type:"structure"` @@ -890,6 +1024,22 @@ func (s ListBranchesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBranchesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBranchesInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a list branches operation. type ListBranchesOutput struct { _ struct{} `type:"structure"` @@ -983,6 +1133,19 @@ func (s PutRepositoryTriggersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRepositoryTriggersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRepositoryTriggersInput"} + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a put repository triggers operation. type PutRepositoryTriggersOutput struct { _ struct{} `type:"structure"` @@ -1145,6 +1308,19 @@ func (s TestRepositoryTriggersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestRepositoryTriggersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestRepositoryTriggersInput"} + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a test repository triggers operation. type TestRepositoryTriggersOutput struct { _ struct{} `type:"structure"` @@ -1189,6 +1365,28 @@ func (s UpdateDefaultBranchInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDefaultBranchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDefaultBranchInput"} + if s.DefaultBranchName == nil { + invalidParams.Add(request.NewErrParamRequired("DefaultBranchName")) + } + if s.DefaultBranchName != nil && len(*s.DefaultBranchName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DefaultBranchName", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateDefaultBranchOutput struct { _ struct{} `type:"structure"` } @@ -1225,6 +1423,22 @@ func (s UpdateRepositoryDescriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRepositoryDescriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryDescriptionInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateRepositoryDescriptionOutput struct { _ struct{} `type:"structure"` } @@ -1260,6 +1474,28 @@ func (s UpdateRepositoryNameInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRepositoryNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRepositoryNameInput"} + if s.NewName == nil { + invalidParams.Add(request.NewErrParamRequired("NewName")) + } + if s.NewName != nil && len(*s.NewName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewName", 1)) + } + if s.OldName == nil { + invalidParams.Add(request.NewErrParamRequired("OldName")) + } + if s.OldName != nil && len(*s.OldName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OldName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateRepositoryNameOutput struct { _ struct{} `type:"structure"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index c4cf48919..fb348cd7f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -1092,6 +1092,22 @@ func (s AddTagsToOnPremisesInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToOnPremisesInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToOnPremisesInstancesInput"} + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddTagsToOnPremisesInstancesOutput struct { _ struct{} `type:"structure"` } @@ -1176,6 +1192,25 @@ func (s BatchGetApplicationRevisionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetApplicationRevisionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetApplicationRevisionsInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.Revisions == nil { + invalidParams.Add(request.NewErrParamRequired("Revisions")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a batch get application revisions operation. type BatchGetApplicationRevisionsOutput struct { _ struct{} `type:"structure"` @@ -1258,6 +1293,25 @@ func (s BatchGetDeploymentGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetDeploymentGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetDeploymentGroupsInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.DeploymentGroupNames == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentGroupNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a batch get deployment groups operation. type BatchGetDeploymentGroupsOutput struct { _ struct{} `type:"structure"` @@ -1300,6 +1354,22 @@ func (s BatchGetDeploymentInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetDeploymentInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetDeploymentInstancesInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a batch get deployment instance operation. type BatchGetDeploymentInstancesOutput struct { _ struct{} `type:"structure"` @@ -1412,6 +1482,22 @@ func (s CreateApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a create application operation. type CreateApplicationOutput struct { _ struct{} `type:"structure"` @@ -1466,6 +1552,22 @@ func (s CreateDeploymentConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeploymentConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentConfigInput"} + if s.DeploymentConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentConfigName")) + } + if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a create deployment configuration operation. type CreateDeploymentConfigOutput struct { _ struct{} `type:"structure"` @@ -1576,6 +1678,34 @@ func (s CreateDeploymentGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeploymentGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentGroupInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) + } + if s.DeploymentGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentGroupName")) + } + if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) + } + if s.ServiceRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a create deployment group operation. type CreateDeploymentGroupOutput struct { _ struct{} `type:"structure"` @@ -1641,6 +1771,28 @@ func (s CreateDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) + } + if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a create deployment operation. type CreateDeploymentOutput struct { _ struct{} `type:"structure"` @@ -1678,6 +1830,22 @@ func (s DeleteApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteApplicationOutput struct { _ struct{} `type:"structure"` } @@ -1711,6 +1879,22 @@ func (s DeleteDeploymentConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeploymentConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentConfigInput"} + if s.DeploymentConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentConfigName")) + } + if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDeploymentConfigOutput struct { _ struct{} `type:"structure"` } @@ -1747,6 +1931,28 @@ func (s DeleteDeploymentGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeploymentGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentGroupInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.DeploymentGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentGroupName")) + } + if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a delete deployment group operation. type DeleteDeploymentGroupOutput struct { _ struct{} `type:"structure"` @@ -1966,6 +2172,19 @@ func (s DeregisterOnPremisesInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterOnPremisesInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterOnPremisesInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterOnPremisesInstanceOutput struct { _ struct{} `type:"structure"` } @@ -2132,6 +2351,22 @@ func (s GetApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get application operation. type GetApplicationOutput struct { _ struct{} `type:"structure"` @@ -2171,6 +2406,25 @@ func (s GetApplicationRevisionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApplicationRevisionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApplicationRevisionInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.Revision == nil { + invalidParams.Add(request.NewErrParamRequired("Revision")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get application revision operation. type GetApplicationRevisionOutput struct { _ struct{} `type:"structure"` @@ -2214,6 +2468,22 @@ func (s GetDeploymentConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentConfigInput"} + if s.DeploymentConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentConfigName")) + } + if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get deployment configuration operation. type GetDeploymentConfigOutput struct { _ struct{} `type:"structure"` @@ -2254,6 +2524,28 @@ func (s GetDeploymentGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentGroupInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.DeploymentGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentGroupName")) + } + if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get deployment group operation. type GetDeploymentGroupOutput struct { _ struct{} `type:"structure"` @@ -2290,6 +2582,19 @@ func (s GetDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of a get deployment instance operation. type GetDeploymentInstanceInput struct { _ struct{} `type:"structure"` @@ -2311,6 +2616,22 @@ func (s GetDeploymentInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInstanceInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get deployment instance operation. type GetDeploymentInstanceOutput struct { _ struct{} `type:"structure"` @@ -2365,6 +2686,19 @@ func (s GetOnPremisesInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOnPremisesInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOnPremisesInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a get on-premises instance operation. type GetOnPremisesInstanceOutput struct { _ struct{} `type:"structure"` @@ -2571,6 +2905,22 @@ func (s ListApplicationRevisionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListApplicationRevisionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListApplicationRevisionsInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a list application revisions operation. type ListApplicationRevisionsOutput struct { _ struct{} `type:"structure"` @@ -2703,6 +3053,22 @@ func (s ListDeploymentGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeploymentGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeploymentGroupsInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a list deployment groups operation. type ListDeploymentGroupsOutput struct { _ struct{} `type:"structure"` @@ -2760,6 +3126,19 @@ func (s ListDeploymentInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeploymentInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeploymentInstancesInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a list deployment instances operation. type ListDeploymentInstancesOutput struct { _ struct{} `type:"structure"` @@ -2821,6 +3200,22 @@ func (s ListDeploymentsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeploymentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeploymentsInput"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.DeploymentGroupName != nil && len(*s.DeploymentGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a list deployments operation. type ListDeploymentsOutput struct { _ struct{} `type:"structure"` @@ -2966,6 +3361,25 @@ func (s RegisterApplicationRevisionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterApplicationRevisionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterApplicationRevisionInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.Revision == nil { + invalidParams.Add(request.NewErrParamRequired("Revision")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterApplicationRevisionOutput struct { _ struct{} `type:"structure"` } @@ -3001,6 +3415,22 @@ func (s RegisterOnPremisesInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterOnPremisesInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterOnPremisesInstanceInput"} + if s.IamUserArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamUserArn")) + } + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterOnPremisesInstanceOutput struct { _ struct{} `type:"structure"` } @@ -3036,6 +3466,22 @@ func (s RemoveTagsFromOnPremisesInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsFromOnPremisesInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromOnPremisesInstancesInput"} + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveTagsFromOnPremisesInstancesOutput struct { _ struct{} `type:"structure"` } @@ -3160,6 +3606,19 @@ func (s StopDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopDeploymentInput"} + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a stop deployment operation. type StopDeploymentOutput struct { _ struct{} `type:"structure"` @@ -3307,6 +3766,22 @@ func (s UpdateApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationInput"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.NewApplicationName != nil && len(*s.NewApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateApplicationOutput struct { _ struct{} `type:"structure"` } @@ -3371,6 +3846,34 @@ func (s UpdateDeploymentGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDeploymentGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentGroupInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentDeploymentGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentDeploymentGroupName")) + } + if s.CurrentDeploymentGroupName != nil && len(*s.CurrentDeploymentGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CurrentDeploymentGroupName", 1)) + } + if s.DeploymentConfigName != nil && len(*s.DeploymentConfigName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentConfigName", 1)) + } + if s.NewDeploymentGroupName != nil && len(*s.NewDeploymentGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewDeploymentGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of an update deployment group operation. type UpdateDeploymentGroupOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go index 9607afa77..8c3b4251c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go @@ -4,6 +4,7 @@ package directoryservice import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -97,6 +98,35 @@ func (c *DirectoryService) CreateComputer(input *CreateComputerInput) (*CreateCo return out, err } +const opCreateConditionalForwarder = "CreateConditionalForwarder" + +// CreateConditionalForwarderRequest generates a request for the CreateConditionalForwarder operation. +func (c *DirectoryService) CreateConditionalForwarderRequest(input *CreateConditionalForwarderInput) (req *request.Request, output *CreateConditionalForwarderOutput) { + op := &request.Operation{ + Name: opCreateConditionalForwarder, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateConditionalForwarderInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateConditionalForwarderOutput{} + req.Data = output + return +} + +// Creates a conditional forwarder associated with your AWS directory. Conditional +// forwarders are required in order to set up a trust relationship with another +// domain. The conditional forwarder points to the trusted domain. +func (c *DirectoryService) CreateConditionalForwarder(input *CreateConditionalForwarderInput) (*CreateConditionalForwarderOutput, error) { + req, out := c.CreateConditionalForwarderRequest(input) + err := req.Send() + return out, err +} + const opCreateDirectory = "CreateDirectory" // CreateDirectoryRequest generates a request for the CreateDirectory operation. @@ -214,6 +244,33 @@ func (c *DirectoryService) CreateTrust(input *CreateTrustInput) (*CreateTrustOut return out, err } +const opDeleteConditionalForwarder = "DeleteConditionalForwarder" + +// DeleteConditionalForwarderRequest generates a request for the DeleteConditionalForwarder operation. +func (c *DirectoryService) DeleteConditionalForwarderRequest(input *DeleteConditionalForwarderInput) (req *request.Request, output *DeleteConditionalForwarderOutput) { + op := &request.Operation{ + Name: opDeleteConditionalForwarder, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteConditionalForwarderInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteConditionalForwarderOutput{} + req.Data = output + return +} + +// Deletes a conditional forwarder that has been set up for your AWS directory. +func (c *DirectoryService) DeleteConditionalForwarder(input *DeleteConditionalForwarderInput) (*DeleteConditionalForwarderOutput, error) { + req, out := c.DeleteConditionalForwarderRequest(input) + err := req.Send() + return out, err +} + const opDeleteDirectory = "DeleteDirectory" // DeleteDirectoryRequest generates a request for the DeleteDirectory operation. @@ -323,6 +380,36 @@ func (c *DirectoryService) DeregisterEventTopic(input *DeregisterEventTopicInput return out, err } +const opDescribeConditionalForwarders = "DescribeConditionalForwarders" + +// DescribeConditionalForwardersRequest generates a request for the DescribeConditionalForwarders operation. +func (c *DirectoryService) DescribeConditionalForwardersRequest(input *DescribeConditionalForwardersInput) (req *request.Request, output *DescribeConditionalForwardersOutput) { + op := &request.Operation{ + Name: opDescribeConditionalForwarders, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeConditionalForwardersInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeConditionalForwardersOutput{} + req.Data = output + return +} + +// Obtains information about the conditional forwarders for this account. +// +// If no input parameters are provided for RemoteDomainNames, this request +// describes all conditional forwarders for the specified directory ID. +func (c *DirectoryService) DescribeConditionalForwarders(input *DescribeConditionalForwardersInput) (*DescribeConditionalForwardersOutput, error) { + req, out := c.DescribeConditionalForwardersRequest(input) + err := req.Send() + return out, err +} + const opDescribeDirectories = "DescribeDirectories" // DescribeDirectoriesRequest generates a request for the DescribeDirectories operation. @@ -687,6 +774,33 @@ func (c *DirectoryService) RestoreFromSnapshot(input *RestoreFromSnapshotInput) return out, err } +const opUpdateConditionalForwarder = "UpdateConditionalForwarder" + +// UpdateConditionalForwarderRequest generates a request for the UpdateConditionalForwarder operation. +func (c *DirectoryService) UpdateConditionalForwarderRequest(input *UpdateConditionalForwarderInput) (req *request.Request, output *UpdateConditionalForwarderOutput) { + op := &request.Operation{ + Name: opUpdateConditionalForwarder, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateConditionalForwarderInput{} + } + + req = c.newRequest(op, input, output) + output = &UpdateConditionalForwarderOutput{} + req.Data = output + return +} + +// Updates a conditional forwarder that has been set up for your AWS directory. +func (c *DirectoryService) UpdateConditionalForwarder(input *UpdateConditionalForwarderInput) (*UpdateConditionalForwarderOutput, error) { + req, out := c.UpdateConditionalForwarderRequest(input) + err := req.Send() + return out, err +} + const opUpdateRadius = "UpdateRadius" // UpdateRadiusRequest generates a request for the UpdateRadius operation. @@ -767,6 +881,19 @@ func (s Attribute) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Attribute) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Attribute"} + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains information about a computer account in a directory. type Computer struct { _ struct{} `type:"structure"` @@ -792,6 +919,37 @@ func (s Computer) GoString() string { return s.String() } +// Points to a remote domain with which you are setting up a trust relationship. +// Conditional forwarders are required in order to set up a trust relationship +// with another domain. +type ConditionalForwarder struct { + _ struct{} `type:"structure"` + + // The IP addresses of the remote DNS server associated with RemoteDomainName. + // This is the IP address of the DNS server that your conditional forwarder + // points to. + DnsIpAddrs []*string `type:"list"` + + // The fully qualified domain name (FQDN) of the remote domains pointed to by + // the conditional forwarder. + RemoteDomainName *string `type:"string"` + + // The replication scope of the conditional forwarder. The only allowed value + // is Domain, which will replicate the conditional forwarder to all of the domain + // controllers for your AWS directory. + ReplicationScope *string `type:"string" enum:"ReplicationScope"` +} + +// String returns the string representation +func (s ConditionalForwarder) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConditionalForwarder) GoString() string { + return s.String() +} + // Contains the inputs for the ConnectDirectory operation. type ConnectDirectoryInput struct { _ struct{} `type:"structure"` @@ -826,6 +984,36 @@ func (s ConnectDirectoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConnectDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConnectDirectoryInput"} + if s.ConnectSettings == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectSettings")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.Password != nil && len(*s.Password) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Password", 1)) + } + if s.Size == nil { + invalidParams.Add(request.NewErrParamRequired("Size")) + } + if s.ConnectSettings != nil { + if err := s.ConnectSettings.Validate(); err != nil { + invalidParams.AddNested("ConnectSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the ConnectDirectory operation. type ConnectDirectoryOutput struct { _ struct{} `type:"structure"` @@ -868,6 +1056,25 @@ func (s CreateAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} + if s.Alias == nil { + invalidParams.Add(request.NewErrParamRequired("Alias")) + } + if s.Alias != nil && len(*s.Alias) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Alias", 1)) + } + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the CreateAlias operation. type CreateAliasOutput struct { _ struct{} `type:"structure"` @@ -922,6 +1129,44 @@ func (s CreateComputerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateComputerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateComputerInput"} + if s.ComputerName == nil { + invalidParams.Add(request.NewErrParamRequired("ComputerName")) + } + if s.ComputerName != nil && len(*s.ComputerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ComputerName", 1)) + } + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.OrganizationalUnitDistinguishedName != nil && len(*s.OrganizationalUnitDistinguishedName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnitDistinguishedName", 1)) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.Password != nil && len(*s.Password) < 8 { + invalidParams.Add(request.NewErrParamMinLen("Password", 8)) + } + if s.ComputerAttributes != nil { + for i, v := range s.ComputerAttributes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ComputerAttributes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results for the CreateComputer operation. type CreateComputerOutput struct { _ struct{} `type:"structure"` @@ -940,6 +1185,67 @@ func (s CreateComputerOutput) GoString() string { return s.String() } +// Initiates the creation of a conditional forwarder for your AWS Directory +// Service for Microsoft Active Directory. Conditional forwarders are required +// in order to set up a trust relationship with another domain. +type CreateConditionalForwarderInput struct { + _ struct{} `type:"structure"` + + // The directory ID of the AWS directory for which you are creating the conditional + // forwarder. + DirectoryId *string `type:"string" required:"true"` + + // The IP addresses of the remote DNS server associated with RemoteDomainName. + DnsIpAddrs []*string `type:"list" required:"true"` + + // The fully qualified domain name (FQDN) of the remote domain with which you + // will set up a trust relationship. + RemoteDomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateConditionalForwarderInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConditionalForwarderInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConditionalForwarderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConditionalForwarderInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.DnsIpAddrs == nil { + invalidParams.Add(request.NewErrParamRequired("DnsIpAddrs")) + } + if s.RemoteDomainName == nil { + invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +type CreateConditionalForwarderOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateConditionalForwarderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConditionalForwarderOutput) GoString() string { + return s.String() +} + // Contains the inputs for the CreateDirectory operation. type CreateDirectoryInput struct { _ struct{} `type:"structure"` @@ -976,6 +1282,30 @@ func (s CreateDirectoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDirectoryInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.Size == nil { + invalidParams.Add(request.NewErrParamRequired("Size")) + } + if s.VpcSettings != nil { + if err := s.VpcSettings.Validate(); err != nil { + invalidParams.AddNested("VpcSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the CreateDirectory operation. type CreateDirectoryOutput struct { _ struct{} `type:"structure"` @@ -1029,6 +1359,30 @@ func (s CreateMicrosoftADInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateMicrosoftADInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateMicrosoftADInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.VpcSettings == nil { + invalidParams.Add(request.NewErrParamRequired("VpcSettings")) + } + if s.VpcSettings != nil { + if err := s.VpcSettings.Validate(); err != nil { + invalidParams.AddNested("VpcSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateMicrosoftADOutput struct { _ struct{} `type:"structure"` @@ -1067,6 +1421,19 @@ func (s CreateSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the CreateSnapshot operation. type CreateSnapshotOutput struct { _ struct{} `type:"structure"` @@ -1096,6 +1463,8 @@ func (s CreateSnapshotOutput) GoString() string { type CreateTrustInput struct { _ struct{} `type:"structure"` + ConditionalForwarderIpAddrs []*string `type:"list"` + // The Directory ID of the Microsoft AD in the AWS cloud for which to establish // the trust relationship. DirectoryId *string `type:"string" required:"true"` @@ -1125,6 +1494,31 @@ func (s CreateTrustInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrustInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrustInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.RemoteDomainName == nil { + invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) + } + if s.TrustDirection == nil { + invalidParams.Add(request.NewErrParamRequired("TrustDirection")) + } + if s.TrustPassword == nil { + invalidParams.Add(request.NewErrParamRequired("TrustPassword")) + } + if s.TrustPassword != nil && len(*s.TrustPassword) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TrustPassword", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateTrustOutput struct { _ struct{} `type:"structure"` @@ -1142,6 +1536,57 @@ func (s CreateTrustOutput) GoString() string { return s.String() } +type DeleteConditionalForwarderInput struct { + _ struct{} `type:"structure"` + + // The directory ID for which you are deleting the conditional forwarder. + DirectoryId *string `type:"string" required:"true"` + + // The fully qualified domain name (FQDN) of the remote domain with which you + // are deleting the conditional forwarder. + RemoteDomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteConditionalForwarderInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConditionalForwarderInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConditionalForwarderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConditionalForwarderInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.RemoteDomainName == nil { + invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +type DeleteConditionalForwarderOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteConditionalForwarderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConditionalForwarderOutput) GoString() string { + return s.String() +} + // Contains the inputs for the DeleteDirectory operation. type DeleteDirectoryInput struct { _ struct{} `type:"structure"` @@ -1160,6 +1605,19 @@ func (s DeleteDirectoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDirectoryInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the DeleteDirectory operation. type DeleteDirectoryOutput struct { _ struct{} `type:"structure"` @@ -1196,6 +1654,19 @@ func (s DeleteSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the DeleteSnapshot operation. type DeleteSnapshotOutput struct { _ struct{} `type:"structure"` @@ -1219,6 +1690,8 @@ func (s DeleteSnapshotOutput) GoString() string { type DeleteTrustInput struct { _ struct{} `type:"structure"` + DeleteAssociatedConditionalForwarder *bool `type:"boolean"` + // The Trust ID of the trust relationship to be deleted. TrustId *string `type:"string" required:"true"` } @@ -1233,6 +1706,19 @@ func (s DeleteTrustInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrustInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrustInput"} + if s.TrustId == nil { + invalidParams.Add(request.NewErrParamRequired("TrustId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteTrustOutput struct { _ struct{} `type:"structure"` @@ -1272,6 +1758,25 @@ func (s DeregisterEventTopicInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterEventTopicInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterEventTopicInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.TopicName == nil { + invalidParams.Add(request.NewErrParamRequired("TopicName")) + } + if s.TopicName != nil && len(*s.TopicName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TopicName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterEventTopicOutput struct { _ struct{} `type:"structure"` } @@ -1286,6 +1791,58 @@ func (s DeregisterEventTopicOutput) GoString() string { return s.String() } +type DescribeConditionalForwardersInput struct { + _ struct{} `type:"structure"` + + // The directory ID for which to get the list of associated conditional forwarders. + DirectoryId *string `type:"string" required:"true"` + + // The fully qualified domain names (FQDN) of the remote domains for which to + // get the list of associated conditional forwarders. If this member is null, + // all conditional forwarders are returned. + RemoteDomainNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeConditionalForwardersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConditionalForwardersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeConditionalForwardersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeConditionalForwardersInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +type DescribeConditionalForwardersOutput struct { + _ struct{} `type:"structure"` + + // The list of conditional forwarders that have been created. + ConditionalForwarders []*ConditionalForwarder `type:"list"` +} + +// String returns the string representation +func (s DescribeConditionalForwardersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConditionalForwardersOutput) GoString() string { + return s.String() +} + // Contains the inputs for the DescribeDirectories operation. type DescribeDirectoriesInput struct { _ struct{} `type:"structure"` @@ -1537,6 +2094,31 @@ func (s DirectoryConnectSettings) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DirectoryConnectSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DirectoryConnectSettings"} + if s.CustomerDnsIps == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerDnsIps")) + } + if s.CustomerUserName == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerUserName")) + } + if s.CustomerUserName != nil && len(*s.CustomerUserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomerUserName", 1)) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains information about an AD Connector directory. type DirectoryConnectSettingsDescription struct { _ struct{} `type:"structure"` @@ -1717,6 +2299,22 @@ func (s DirectoryVpcSettings) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DirectoryVpcSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DirectoryVpcSettings"} + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains information about the directory. type DirectoryVpcSettingsDescription struct { _ struct{} `type:"structure"` @@ -1765,6 +2363,19 @@ func (s DisableRadiusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableRadiusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableRadiusInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the DisableRadius operation. type DisableRadiusOutput struct { _ struct{} `type:"structure"` @@ -1814,6 +2425,25 @@ func (s DisableSsoInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableSsoInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableSsoInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.Password != nil && len(*s.Password) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Password", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the DisableSso operation. type DisableSsoOutput struct { _ struct{} `type:"structure"` @@ -1850,6 +2480,27 @@ func (s EnableRadiusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableRadiusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableRadiusInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.RadiusSettings == nil { + invalidParams.Add(request.NewErrParamRequired("RadiusSettings")) + } + if s.RadiusSettings != nil { + if err := s.RadiusSettings.Validate(); err != nil { + invalidParams.AddNested("RadiusSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the EnableRadius operation. type EnableRadiusOutput struct { _ struct{} `type:"structure"` @@ -1899,6 +2550,25 @@ func (s EnableSsoInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableSsoInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableSsoInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.Password != nil && len(*s.Password) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Password", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the EnableSso operation. type EnableSsoOutput struct { _ struct{} `type:"structure"` @@ -1997,6 +2667,19 @@ func (s GetSnapshotLimitsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSnapshotLimitsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSnapshotLimitsInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the GetSnapshotLimits operation. type GetSnapshotLimitsOutput struct { _ struct{} `type:"structure"` @@ -2061,6 +2744,28 @@ func (s RadiusSettings) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RadiusSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RadiusSettings"} + if s.DisplayLabel != nil && len(*s.DisplayLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DisplayLabel", 1)) + } + if s.RadiusPort != nil && *s.RadiusPort < 1025 { + invalidParams.Add(request.NewErrParamMinValue("RadiusPort", 1025)) + } + if s.RadiusTimeout != nil && *s.RadiusTimeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("RadiusTimeout", 1)) + } + if s.SharedSecret != nil && len(*s.SharedSecret) < 8 { + invalidParams.Add(request.NewErrParamMinLen("SharedSecret", 8)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterEventTopicInput struct { _ struct{} `type:"structure"` @@ -2082,6 +2787,25 @@ func (s RegisterEventTopicInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterEventTopicInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterEventTopicInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.TopicName == nil { + invalidParams.Add(request.NewErrParamRequired("TopicName")) + } + if s.TopicName != nil && len(*s.TopicName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TopicName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterEventTopicOutput struct { _ struct{} `type:"structure"` } @@ -2114,6 +2838,19 @@ func (s RestoreFromSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreFromSnapshotInput"} + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the RestoreFromSnapshot operation. type RestoreFromSnapshotOutput struct { _ struct{} `type:"structure"` @@ -2216,6 +2953,9 @@ type Trust struct { // The trust relationship state. TrustState *string `type:"string" enum:"TrustState"` + // The reason for the TrustState. + TrustStateReason *string `type:"string"` + // The trust relationship type. TrustType *string `type:"string" enum:"TrustType"` } @@ -2230,6 +2970,65 @@ func (s Trust) GoString() string { return s.String() } +type UpdateConditionalForwarderInput struct { + _ struct{} `type:"structure"` + + // The directory ID of the AWS directory for which to update the conditional + // forwarder. + DirectoryId *string `type:"string" required:"true"` + + // The updated IP addresses of the remote DNS server associated with the conditional + // forwarder. + DnsIpAddrs []*string `type:"list" required:"true"` + + // The fully qualified domain name (FQDN) of the remote domain with which you + // will set up a trust relationship. + RemoteDomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateConditionalForwarderInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConditionalForwarderInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateConditionalForwarderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateConditionalForwarderInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.DnsIpAddrs == nil { + invalidParams.Add(request.NewErrParamRequired("DnsIpAddrs")) + } + if s.RemoteDomainName == nil { + invalidParams.Add(request.NewErrParamRequired("RemoteDomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +type UpdateConditionalForwarderOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateConditionalForwarderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateConditionalForwarderOutput) GoString() string { + return s.String() +} + // Contains the inputs for the UpdateRadius operation. type UpdateRadiusInput struct { _ struct{} `type:"structure"` @@ -2251,6 +3050,27 @@ func (s UpdateRadiusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRadiusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRadiusInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.RadiusSettings == nil { + invalidParams.Add(request.NewErrParamRequired("RadiusSettings")) + } + if s.RadiusSettings != nil { + if err := s.RadiusSettings.Validate(); err != nil { + invalidParams.AddNested("RadiusSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the results of the UpdateRadius operation. type UpdateRadiusOutput struct { _ struct{} `type:"structure"` @@ -2285,6 +3105,19 @@ func (s VerifyTrustInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *VerifyTrustInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VerifyTrustInput"} + if s.TrustId == nil { + invalidParams.Add(request.NewErrParamRequired("TrustId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type VerifyTrustOutput struct { _ struct{} `type:"structure"` @@ -2363,6 +3196,11 @@ const ( RadiusStatusFailed = "Failed" ) +const ( + // @enum ReplicationScope + ReplicationScopeDomain = "Domain" +) + const ( // @enum SnapshotStatus SnapshotStatusCreating = "Creating" diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index 531781e20..b4cc4e1cc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -4,6 +4,7 @@ package dynamodb import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -785,6 +786,25 @@ func (s AttributeDefinition) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttributeDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttributeDefinition"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.AttributeName != nil && len(*s.AttributeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) + } + if s.AttributeType == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the data for an attribute. You can set one, and only one, of the // elements. // @@ -1049,6 +1069,32 @@ func (s BatchGetItemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetItemInput"} + if s.RequestItems == nil { + invalidParams.Add(request.NewErrParamRequired("RequestItems")) + } + if s.RequestItems != nil && len(s.RequestItems) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestItems", 1)) + } + if s.RequestItems != nil { + for i, v := range s.RequestItems { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RequestItems", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a BatchGetItem operation. type BatchGetItemOutput struct { _ struct{} `type:"structure"` @@ -1166,6 +1212,22 @@ func (s BatchWriteItemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchWriteItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchWriteItemInput"} + if s.RequestItems == nil { + invalidParams.Add(request.NewErrParamRequired("RequestItems")) + } + if s.RequestItems != nil && len(s.RequestItems) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a BatchWriteItem operation. type BatchWriteItemOutput struct { _ struct{} `type:"structure"` @@ -1435,6 +1497,19 @@ func (s Condition) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Condition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Condition"} + if s.ComparisonOperator == nil { + invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The capacity units consumed by an operation. The data returned includes the // total provisioned throughput consumed, along with statistics for the table // and any indexes involved in the operation. ConsumedCapacity is only returned @@ -1504,6 +1579,54 @@ func (s CreateGlobalSecondaryIndexAction) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGlobalSecondaryIndexAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGlobalSecondaryIndexAction"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.KeySchema == nil { + invalidParams.Add(request.NewErrParamRequired("KeySchema")) + } + if s.KeySchema != nil && len(s.KeySchema) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) + } + if s.Projection == nil { + invalidParams.Add(request.NewErrParamRequired("Projection")) + } + if s.ProvisionedThroughput == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) + } + if s.KeySchema != nil { + for i, v := range s.KeySchema { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Projection != nil { + if err := s.Projection.Validate(); err != nil { + invalidParams.AddNested("Projection", err.(request.ErrInvalidParams)) + } + } + if s.ProvisionedThroughput != nil { + if err := s.ProvisionedThroughput.Validate(); err != nil { + invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of a CreateTable operation. type CreateTableInput struct { _ struct{} `type:"structure"` @@ -1656,6 +1779,79 @@ func (s CreateTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTableInput"} + if s.AttributeDefinitions == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeDefinitions")) + } + if s.KeySchema == nil { + invalidParams.Add(request.NewErrParamRequired("KeySchema")) + } + if s.KeySchema != nil && len(s.KeySchema) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) + } + if s.ProvisionedThroughput == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.AttributeDefinitions != nil { + for i, v := range s.AttributeDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.GlobalSecondaryIndexes != nil { + for i, v := range s.GlobalSecondaryIndexes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams)) + } + } + } + if s.KeySchema != nil { + for i, v := range s.KeySchema { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) + } + } + } + if s.LocalSecondaryIndexes != nil { + for i, v := range s.LocalSecondaryIndexes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LocalSecondaryIndexes", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ProvisionedThroughput != nil { + if err := s.ProvisionedThroughput.Validate(); err != nil { + invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a CreateTable operation. type CreateTableOutput struct { _ struct{} `type:"structure"` @@ -1692,6 +1888,22 @@ func (s DeleteGlobalSecondaryIndexAction) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGlobalSecondaryIndexAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGlobalSecondaryIndexAction"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of a DeleteItem operation. type DeleteItemInput struct { _ struct{} `type:"structure"` @@ -2046,6 +2258,25 @@ func (s DeleteItemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteItemInput"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a DeleteItem operation. type DeleteItemOutput struct { _ struct{} `type:"structure"` @@ -2133,6 +2364,22 @@ func (s DeleteTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTableInput"} + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a DeleteTable operation. type DeleteTableOutput struct { _ struct{} `type:"structure"` @@ -2217,6 +2464,22 @@ func (s DescribeTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTableInput"} + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a DescribeTable operation. type DescribeTableOutput struct { _ struct{} `type:"structure"` @@ -2564,6 +2827,28 @@ func (s GetItemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetItemInput"} + if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a GetItem operation. type GetItemOutput struct { _ struct{} `type:"structure"` @@ -2639,6 +2924,54 @@ func (s GlobalSecondaryIndex) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GlobalSecondaryIndex) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndex"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.KeySchema == nil { + invalidParams.Add(request.NewErrParamRequired("KeySchema")) + } + if s.KeySchema != nil && len(s.KeySchema) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) + } + if s.Projection == nil { + invalidParams.Add(request.NewErrParamRequired("Projection")) + } + if s.ProvisionedThroughput == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) + } + if s.KeySchema != nil { + for i, v := range s.KeySchema { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Projection != nil { + if err := s.Projection.Validate(); err != nil { + invalidParams.AddNested("Projection", err.(request.ErrInvalidParams)) + } + } + if s.ProvisionedThroughput != nil { + if err := s.ProvisionedThroughput.Validate(); err != nil { + invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the properties of a global secondary index. type GlobalSecondaryIndexDescription struct { _ struct{} `type:"structure"` @@ -2759,6 +3092,31 @@ func (s GlobalSecondaryIndexUpdate) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GlobalSecondaryIndexUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndexUpdate"} + if s.Create != nil { + if err := s.Create.Validate(); err != nil { + invalidParams.AddNested("Create", err.(request.ErrInvalidParams)) + } + } + if s.Delete != nil { + if err := s.Delete.Validate(); err != nil { + invalidParams.AddNested("Delete", err.(request.ErrInvalidParams)) + } + } + if s.Update != nil { + if err := s.Update.Validate(); err != nil { + invalidParams.AddNested("Update", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Information about item collections, if any, that were affected by the operation. // ItemCollectionMetrics is only returned if the request asked for it. If the // table does not have any local secondary indexes, this information is not @@ -2836,6 +3194,25 @@ func (s KeySchemaElement) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *KeySchemaElement) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KeySchemaElement"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.AttributeName != nil && len(*s.AttributeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) + } + if s.KeyType == nil { + invalidParams.Add(request.NewErrParamRequired("KeyType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents a set of primary keys and, for each key, the attributes to retrieve // from the table. // @@ -2920,6 +3297,25 @@ func (s KeysAndAttributes) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *KeysAndAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KeysAndAttributes"} + if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) + } + if s.Keys == nil { + invalidParams.Add(request.NewErrParamRequired("Keys")) + } + if s.Keys != nil && len(s.Keys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Keys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of a ListTables operation. type ListTablesInput struct { _ struct{} `type:"structure"` @@ -2944,6 +3340,22 @@ func (s ListTablesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTablesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTablesInput"} + if s.ExclusiveStartTableName != nil && len(*s.ExclusiveStartTableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTableName", 3)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a ListTables operation. type ListTablesOutput struct { _ struct{} `type:"structure"` @@ -3016,6 +3428,46 @@ func (s LocalSecondaryIndex) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LocalSecondaryIndex) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LocalSecondaryIndex"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.KeySchema == nil { + invalidParams.Add(request.NewErrParamRequired("KeySchema")) + } + if s.KeySchema != nil && len(s.KeySchema) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) + } + if s.Projection == nil { + invalidParams.Add(request.NewErrParamRequired("Projection")) + } + if s.KeySchema != nil { + for i, v := range s.KeySchema { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Projection != nil { + if err := s.Projection.Validate(); err != nil { + invalidParams.AddNested("Projection", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the properties of a local secondary index. type LocalSecondaryIndexDescription struct { _ struct{} `type:"structure"` @@ -3103,6 +3555,19 @@ func (s Projection) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Projection) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Projection"} + if s.NonKeyAttributes != nil && len(s.NonKeyAttributes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NonKeyAttributes", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the provisioned throughput settings for a specified table or index. // The settings can be modified using the UpdateTable operation. // @@ -3135,6 +3600,28 @@ func (s ProvisionedThroughput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisionedThroughput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisionedThroughput"} + if s.ReadCapacityUnits == nil { + invalidParams.Add(request.NewErrParamRequired("ReadCapacityUnits")) + } + if s.ReadCapacityUnits != nil && *s.ReadCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("ReadCapacityUnits", 1)) + } + if s.WriteCapacityUnits == nil { + invalidParams.Add(request.NewErrParamRequired("WriteCapacityUnits")) + } + if s.WriteCapacityUnits != nil && *s.WriteCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("WriteCapacityUnits", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the provisioned throughput settings for the table, consisting // of read and write capacity units, along with data about increases and decreases. type ProvisionedThroughputDescription struct { @@ -3539,6 +4026,25 @@ func (s PutItemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutItemInput"} + if s.Item == nil { + invalidParams.Add(request.NewErrParamRequired("Item")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a PutItem operation. type PutItemOutput struct { _ struct{} `type:"structure"` @@ -4103,6 +4609,51 @@ func (s QueryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *QueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueryInput"} + if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.KeyConditions != nil { + for i, v := range s.KeyConditions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeyConditions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.QueryFilter != nil { + for i, v := range s.QueryFilter { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueryFilter", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a Query operation. type QueryOutput struct { _ struct{} `type:"structure"` @@ -4460,6 +5011,44 @@ func (s ScanInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScanInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScanInput"} + if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.TotalSegments != nil && *s.TotalSegments < 1 { + invalidParams.Add(request.NewErrParamMinValue("TotalSegments", 1)) + } + if s.ScanFilter != nil { + for i, v := range s.ScanFilter { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScanFilter", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a Scan operation. type ScanOutput struct { _ struct{} `type:"structure"` @@ -4793,6 +5382,30 @@ func (s UpdateGlobalSecondaryIndexAction) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGlobalSecondaryIndexAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalSecondaryIndexAction"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.ProvisionedThroughput == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) + } + if s.ProvisionedThroughput != nil { + if err := s.ProvisionedThroughput.Validate(); err != nil { + invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of an UpdateItem operation. type UpdateItemInput struct { _ struct{} `type:"structure"` @@ -5326,6 +5939,25 @@ func (s UpdateItemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateItemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateItemInput"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of an UpdateItem operation. type UpdateItemOutput struct { _ struct{} `type:"structure"` @@ -5412,6 +6044,47 @@ func (s UpdateTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTableInput"} + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.AttributeDefinitions != nil { + for i, v := range s.AttributeDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.GlobalSecondaryIndexUpdates != nil { + for i, v := range s.GlobalSecondaryIndexUpdates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexUpdates", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ProvisionedThroughput != nil { + if err := s.ProvisionedThroughput.Validate(); err != nil { + invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of an UpdateTable operation. type UpdateTableOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index e6ca6fba5..2b968591b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -4,6 +4,7 @@ package ec2 import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -389,12 +390,18 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques // // If a volume has an AWS Marketplace product code: // -// The volume can be attached only to a stopped instance. AWS Marketplace -// product codes are copied from the volume to the instance. You must be subscribed -// to the product. The instance type and operating system of the instance must -// support the product. For example, you can't detach a volume from a Windows -// instance and attach it to a Linux instance. For an overview of the AWS Marketplace, -// see Introducing AWS Marketplace (https://aws.amazon.com/marketplace/help/200900000). +// The volume can be attached only to a stopped instance. +// +// AWS Marketplace product codes are copied from the volume to the instance. +// +// You must be subscribed to the product. +// +// The instance type and operating system of the instance must support the +// product. For example, you can't detach a volume from a Windows instance and +// attach it to a Linux instance. +// +// For an overview of the AWS Marketplace, see Introducing AWS Marketplace +// (https://aws.amazon.com/marketplace/help/200900000). // // For more information about EBS volumes, see Attaching Amazon EBS Volumes // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) @@ -969,25 +976,33 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ // domain-name-servers - The IP addresses of up to four domain name servers, // or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. // If specifying more than one domain name server, specify the IP addresses -// in a single parameter, separated by commas. domain-name - If you're using -// AmazonProvidedDNS in us-east-1, specify ec2.internal. If you're using AmazonProvidedDNS -// in another region, specify region.compute.internal (for example, ap-northeast-1.compute.internal). -// Otherwise, specify a domain name (for example, MyCompany.com). Important: +// in a single parameter, separated by commas. +// +// domain-name - If you're using AmazonProvidedDNS in "us-east-1", specify +// "ec2.internal". If you're using AmazonProvidedDNS in another region, specify +// "region.compute.internal" (for example, "ap-northeast-1.compute.internal"). +// Otherwise, specify a domain name (for example, "MyCompany.com"). Important: // Some Linux operating systems accept multiple domain names separated by spaces. // However, Windows and other Linux operating systems treat the value as a single // domain, which results in unexpected behavior. If your DHCP options set is // associated with a VPC that has instances with multiple operating systems, -// specify only one domain name. ntp-servers - The IP addresses of up to four -// Network Time Protocol (NTP) servers. netbios-name-servers - The IP addresses -// of up to four NetBIOS name servers. netbios-node-type - The NetBIOS node -// type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast -// are not currently supported). For more information about these node types, -// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt). Your VPC automatically -// starts out with a set of DHCP options that includes only a DNS server that -// we provide (AmazonProvidedDNS). If you create a set of options, and if your -// VPC has an Internet gateway, make sure to set the domain-name-servers option -// either to AmazonProvidedDNS or to a domain name server of your choice. For -// more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// specify only one domain name. +// +// ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) +// servers. +// +// netbios-name-servers - The IP addresses of up to four NetBIOS name servers. +// +// netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend +// that you specify 2 (broadcast and multicast are not currently supported). +// For more information about these node types, see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt). +// +// Your VPC automatically starts out with a set of DHCP options that includes +// only a DNS server that we provide (AmazonProvidedDNS). If you create a set +// of options, and if your VPC has an Internet gateway, make sure to set the +// domain-name-servers option either to AmazonProvidedDNS or to a domain name +// server of your choice. For more information about DHCP options, see DHCP +// Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. func (c *EC2) CreateDhcpOptions(input *CreateDhcpOptionsInput) (*CreateDhcpOptionsOutput, error) { req, out := c.CreateDhcpOptionsRequest(input) @@ -1762,6 +1777,11 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out // which includes only a default DNS server that we provide (AmazonProvidedDNS). // For more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. +// +// You can specify the instance tenancy value for the VPC when you create it. +// You can't change this value for the VPC after you create it. For more information, +// see Dedicated Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/dedicated-instance.html.html) +// in the Amazon Virtual Private Cloud User Guide. func (c *EC2) CreateVpc(input *CreateVpcInput) (*CreateVpcOutput, error) { req, out := c.CreateVpcRequest(input) err := req.Send() @@ -1872,6 +1892,9 @@ func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req * // create a new VPN connection, you must reconfigure your customer gateway with // the new information returned from this call. // +// This is an idempotent operation. If you perform the operation more than +// once, Amazon EC2 doesn't return an error. +// // For more information about VPN connections, see Adding a Hardware Virtual // Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) // in the Amazon Virtual Private Cloud User Guide. @@ -3115,7 +3138,8 @@ func (c *EC2) DescribeIdFormatRequest(input *DescribeIdFormatInput) (req *reques // request only returns information about resource types whose ID formats can // be modified; it does not return information about other resource types. // -// The following resource types support longer IDs: instance | reservation. +// The following resource types support longer IDs: instance | reservation +// | snapshot | volume. // // These settings apply to the IAM user who makes the request; they do not // apply to the entire AWS account. By default, an IAM user defaults to the @@ -3303,7 +3327,8 @@ func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) return } -// Describes the status of one or more instances. +// Describes the status of one or more instances. By default, only running instances +// are described, unless specified otherwise. // // Instance status includes the following components: // @@ -4047,14 +4072,20 @@ func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *requ // // The create volume permissions fall into the following categories: // -// public: The owner of the snapshot granted create volume permissions for +// public: The owner of the snapshot granted create volume permissions for // the snapshot to the all group. All AWS accounts have create volume permissions -// for these snapshots. explicit: The owner of the snapshot granted create volume -// permissions to a specific AWS account. implicit: An AWS account has implicit -// create volume permissions for all snapshots it owns. The list of snapshots -// returned can be modified by specifying snapshot IDs, snapshot owners, or -// AWS accounts with create volume permissions. If no options are specified, -// Amazon EC2 returns all snapshots for which you have create volume permissions. +// for these snapshots. +// +// explicit: The owner of the snapshot granted create volume permissions +// to a specific AWS account. +// +// implicit: An AWS account has implicit create volume permissions for all +// snapshots it owns. +// +// The list of snapshots returned can be modified by specifying snapshot +// IDs, snapshot owners, or AWS accounts with create volume permissions. If +// no options are specified, Amazon EC2 returns all snapshots for which you +// have create volume permissions. // // If you specify one or more snapshot IDs, only snapshots that have the specified // IDs are returned. If you specify an invalid snapshot ID, an error is returned. @@ -5538,7 +5569,7 @@ func (c *EC2) ModifyIdFormatRequest(input *ModifyIdFormatInput) (req *request.Re // Modifies the ID format for the specified resource on a per-region basis. // You can specify that resources should receive longer IDs (17-character IDs) // when they are created. The following resource types support longer IDs: instance -// | reservation. +// | reservation | snapshot | volume. // // This setting applies to the IAM user who makes the request; it does not // apply to the entire AWS account. By default, an IAM user defaults to the @@ -5943,6 +5974,49 @@ func (c *EC2) ModifyVpcEndpoint(input *ModifyVpcEndpointInput) (*ModifyVpcEndpoi return out, err } +const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions" + +// ModifyVpcPeeringConnectionOptionsRequest generates a request for the ModifyVpcPeeringConnectionOptions operation. +func (c *EC2) ModifyVpcPeeringConnectionOptionsRequest(input *ModifyVpcPeeringConnectionOptionsInput) (req *request.Request, output *ModifyVpcPeeringConnectionOptionsOutput) { + op := &request.Operation{ + Name: opModifyVpcPeeringConnectionOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyVpcPeeringConnectionOptionsInput{} + } + + req = c.newRequest(op, input, output) + output = &ModifyVpcPeeringConnectionOptionsOutput{} + req.Data = output + return +} + +// Modifies the VPC peering connection options on one side of a VPC peering +// connection. You can do the following: +// +// Enable/disable communication over the peering connection between an EC2-Classic +// instance that's linked to your VPC (using ClassicLink) and instances in the +// peer VPC. +// +// Enable/disable communication over the peering connection between instances +// in your VPC and an EC2-Classic instance that's linked to the peer VPC. +// +// If the peered VPCs are in different accounts, each owner must initiate +// a separate request to enable or disable communication in either direction, +// depending on whether their VPC was the requester or accepter for the VPC +// peering connection. If the peered VPCs are in the same account, you can modify +// the requester and accepter options in the same request. To confirm which +// VPC is the accepter and requester for a VPC peering connection, use the DescribeVpcPeeringConnections +// command. +func (c *EC2) ModifyVpcPeeringConnectionOptions(input *ModifyVpcPeeringConnectionOptionsInput) (*ModifyVpcPeeringConnectionOptionsOutput, error) { + req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input) + err := req.Send() + return out, err +} + const opMonitorInstances = "MonitorInstances" // MonitorInstancesRequest generates a request for the MonitorInstances operation. @@ -5997,10 +6071,10 @@ func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *reques // than 24 hours, and it must not be associated with an instance. After the // Elastic IP address is moved, it is no longer available for use in the EC2-Classic // platform, unless you move it back using the RestoreAddressToClassic request. -// You cannot move an Elastic IP address that's allocated for use in the EC2-VPC -// platform to the EC2-Classic platform. You cannot migrate an Elastic IP address -// that's associated with a reverse DNS record. Contact AWS account and billing -// support to remove the reverse DNS record. +// You cannot move an Elastic IP address that was originally allocated for use +// in the EC2-VPC platform to the EC2-Classic platform. You cannot migrate an +// Elastic IP address that's associated with a reverse DNS record. Contact AWS +// account and billing support to remove the reverse DNS record. func (c *EC2) MoveAddressToVpc(input *MoveAddressToVpcInput) (*MoveAddressToVpcOutput, error) { req, out := c.MoveAddressToVpcRequest(input) err := req.Send() @@ -6070,7 +6144,11 @@ func (c *EC2) PurchaseScheduledInstancesRequest(input *PurchaseScheduledInstance // Scheduled Instances enable you to purchase Amazon EC2 compute capacity by // the hour for a one-year term. Before you can purchase a Scheduled Instance, // you must call DescribeScheduledInstanceAvailability to check for available -// schedules and obtain a purchase token. +// schedules and obtain a purchase token. After you purchase a Scheduled Instance, +// you must call RunScheduledInstances during each scheduled time period. +// +// After you purchase a Scheduled Instance, you can't cancel, modify, or resell +// your purchase. func (c *EC2) PurchaseScheduledInstances(input *PurchaseScheduledInstancesInput) (*PurchaseScheduledInstancesOutput, error) { req, out := c.PurchaseScheduledInstancesRequest(input) err := req.Send() @@ -6104,8 +6182,8 @@ func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request. // succeeds if the instances are valid and belong to you. Requests to reboot // terminated instances are ignored. // -// If a Linux/Unix instance does not cleanly shut down within four minutes, -// Amazon EC2 performs a hard reboot. +// If an instance does not cleanly shut down within four minutes, Amazon EC2 +// performs a hard reboot. // // For more information about troubleshooting, see Getting Console Output and // Rebooting Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html) @@ -6866,7 +6944,9 @@ func (c *EC2) RunScheduledInstancesRequest(input *RunScheduledInstancesInput) (r // You must launch a Scheduled Instance during its scheduled time period. You // can't stop or reboot a Scheduled Instance, but you can terminate it as needed. // If you terminate a Scheduled Instance before the current scheduled time period -// ends, you can launch it again after a few minutes. +// ends, you can launch it again after a few minutes. For more information, +// see Scheduled Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html) +// in the Amazon Elastic Compute Cloud User Guide. func (c *EC2) RunScheduledInstances(input *RunScheduledInstancesInput) (*RunScheduledInstancesOutput, error) { req, out := c.RunScheduledInstancesRequest(input) err := req.Send() @@ -6938,32 +7018,29 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ return } -// Stops an Amazon EBS-backed instance. Each time you transition an instance -// from stopped to started, Amazon EC2 charges a full instance hour, even if -// transitions happen multiple times within a single hour. +// Stops an Amazon EBS-backed instance. // -// You can't start or stop Spot instances. +// We don't charge hourly usage for a stopped instance, or data transfer fees; +// however, your root partition Amazon EBS volume remains, continues to persist +// your data, and you are charged for Amazon EBS volume usage. Each time you +// transition an instance from stopped to started, Amazon EC2 charges a full +// instance hour, even if transitions happen multiple times within a single +// hour. // -// Instances that use Amazon EBS volumes as their root devices can be quickly -// stopped and started. When an instance is stopped, the compute resources are -// released and you are not billed for hourly instance usage. However, your -// root partition Amazon EBS volume remains, continues to persist your data, -// and you are charged for Amazon EBS volume usage. You can restart your instance -// at any time. +// You can't start or stop Spot instances, and you can't stop instance store-backed +// instances. // -// Before stopping an instance, make sure it is in a state from which it can -// be restarted. Stopping an instance does not preserve data stored in RAM. +// When you stop an instance, we shut it down. You can restart your instance +// at any time. Before stopping an instance, make sure it is in a state from +// which it can be restarted. Stopping an instance does not preserve data stored +// in RAM. // -// Performing this operation on an instance that uses an instance store as -// its root device returns an error. -// -// You can stop, start, and terminate EBS-backed instances. You can only terminate -// instance store-backed instances. What happens to an instance differs if you -// stop it or terminate it. For example, when you stop an instance, the root -// device and any other devices attached to the instance persist. When you terminate -// an instance, the root device and any other devices attached during the instance -// launch are automatically deleted. For more information about the differences -// between stopping and terminating instances, see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) +// Stopping an instance is different to rebooting or terminating it. For example, +// when you stop an instance, the root device and any other devices attached +// to the instance persist. When you terminate an instance, the root device +// and any other devices attached during the instance launch are automatically +// deleted. For more information about the differences between rebooting, stopping, +// and terminating instances, see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) // in the Amazon Elastic Compute Cloud User Guide. // // For more information about troubleshooting, see Troubleshooting Stopping @@ -7081,6 +7158,7 @@ func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInst return out, err } +// Contains the parameters for AcceptVpcPeeringConnection. type AcceptVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -7104,6 +7182,7 @@ func (s AcceptVpcPeeringConnectionInput) GoString() string { return s.String() } +// Contains the output of AcceptVpcPeeringConnection. type AcceptVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -7225,6 +7304,7 @@ func (s Address) GoString() string { return s.String() } +// Contains the parameters for AllocateAddress. type AllocateAddressInput struct { _ struct{} `type:"structure"` @@ -7250,6 +7330,7 @@ func (s AllocateAddressInput) GoString() string { return s.String() } +// Contains the output of AllocateAddress. type AllocateAddressOutput struct { _ struct{} `type:"structure"` @@ -7275,6 +7356,7 @@ func (s AllocateAddressOutput) GoString() string { return s.String() } +// Contains the parameters for AllocateHosts. type AllocateHostsInput struct { _ struct{} `type:"structure"` @@ -7313,6 +7395,26 @@ func (s AllocateHostsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllocateHostsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllocateHostsInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of AllocateHosts. type AllocateHostsOutput struct { _ struct{} `type:"structure"` @@ -7331,6 +7433,7 @@ func (s AllocateHostsOutput) GoString() string { return s.String() } +// Contains the parameters for AssignPrivateIpAddresses. type AssignPrivateIpAddressesInput struct { _ struct{} `type:"structure"` @@ -7364,6 +7467,19 @@ func (s AssignPrivateIpAddressesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssignPrivateIpAddressesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssignPrivateIpAddressesInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AssignPrivateIpAddressesOutput struct { _ struct{} `type:"structure"` } @@ -7378,6 +7494,7 @@ func (s AssignPrivateIpAddressesOutput) GoString() string { return s.String() } +// Contains the parameters for AssociateAddress. type AssociateAddressInput struct { _ struct{} `type:"structure"` @@ -7427,6 +7544,7 @@ func (s AssociateAddressInput) GoString() string { return s.String() } +// Contains the output of AssociateAddress. type AssociateAddressOutput struct { _ struct{} `type:"structure"` @@ -7445,6 +7563,7 @@ func (s AssociateAddressOutput) GoString() string { return s.String() } +// Contains the parameters for AssociateDhcpOptions. type AssociateDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -7472,6 +7591,22 @@ func (s AssociateDhcpOptionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateDhcpOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateDhcpOptionsInput"} + if s.DhcpOptionsId == nil { + invalidParams.Add(request.NewErrParamRequired("DhcpOptionsId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AssociateDhcpOptionsOutput struct { _ struct{} `type:"structure"` } @@ -7486,6 +7621,7 @@ func (s AssociateDhcpOptionsOutput) GoString() string { return s.String() } +// Contains the parameters for AssociateRouteTable. type AssociateRouteTableInput struct { _ struct{} `type:"structure"` @@ -7512,6 +7648,23 @@ func (s AssociateRouteTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateRouteTableInput"} + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of AssociateRouteTable. type AssociateRouteTableOutput struct { _ struct{} `type:"structure"` @@ -7529,6 +7682,7 @@ func (s AssociateRouteTableOutput) GoString() string { return s.String() } +// Contains the parameters for AttachClassicLinkVpc. type AttachClassicLinkVpcInput struct { _ struct{} `type:"structure"` @@ -7559,6 +7713,26 @@ func (s AttachClassicLinkVpcInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachClassicLinkVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachClassicLinkVpcInput"} + if s.Groups == nil { + invalidParams.Add(request.NewErrParamRequired("Groups")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of AttachClassicLinkVpc. type AttachClassicLinkVpcOutput struct { _ struct{} `type:"structure"` @@ -7576,6 +7750,7 @@ func (s AttachClassicLinkVpcOutput) GoString() string { return s.String() } +// Contains the parameters for AttachInternetGateway. type AttachInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -7602,6 +7777,22 @@ func (s AttachInternetGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachInternetGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachInternetGatewayInput"} + if s.InternetGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachInternetGatewayOutput struct { _ struct{} `type:"structure"` } @@ -7616,6 +7807,7 @@ func (s AttachInternetGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for AttachNetworkInterface. type AttachNetworkInterfaceInput struct { _ struct{} `type:"structure"` @@ -7645,6 +7837,26 @@ func (s AttachNetworkInterfaceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachNetworkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachNetworkInterfaceInput"} + if s.DeviceIndex == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceIndex")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of AttachNetworkInterface. type AttachNetworkInterfaceOutput struct { _ struct{} `type:"structure"` @@ -7662,6 +7874,7 @@ func (s AttachNetworkInterfaceOutput) GoString() string { return s.String() } +// Contains the parameters for AttachVolume. type AttachVolumeInput struct { _ struct{} `type:"structure"` @@ -7692,6 +7905,26 @@ func (s AttachVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachVolumeInput"} + if s.Device == nil { + invalidParams.Add(request.NewErrParamRequired("Device")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the parameters for AttachVpnGateway. type AttachVpnGatewayInput struct { _ struct{} `type:"structure"` @@ -7718,6 +7951,23 @@ func (s AttachVpnGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachVpnGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachVpnGatewayInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + if s.VpnGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of AttachVpnGateway. type AttachVpnGatewayOutput struct { _ struct{} `type:"structure"` @@ -7771,6 +8021,7 @@ func (s AttributeValue) GoString() string { return s.String() } +// Contains the parameters for AuthorizeSecurityGroupEgress. type AuthorizeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` @@ -7824,6 +8075,19 @@ func (s AuthorizeSecurityGroupEgressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeSecurityGroupEgressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeSecurityGroupEgressInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AuthorizeSecurityGroupEgressOutput struct { _ struct{} `type:"structure"` } @@ -7838,6 +8102,7 @@ func (s AuthorizeSecurityGroupEgressOutput) GoString() string { return s.String() } +// Contains the parameters for AuthorizeSecurityGroupIngress. type AuthorizeSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -7872,17 +8137,18 @@ type AuthorizeSecurityGroupIngressInput struct { // [EC2-Classic, default VPC] The name of the source security group. You can't // specify this parameter in combination with the following parameters: the // CIDR IP address range, the start of the port range, the IP protocol, and - // the end of the port range. For EC2-VPC, the source security group must be - // in the same VPC. + // the end of the port range. Creates rules that grant full ICMP, UDP, and TCP + // access. To create a rule with a specific IP protocol and port range, use + // a set of IP permissions instead. For EC2-VPC, the source security group must + // be in the same VPC. SourceSecurityGroupName *string `type:"string"` - // [EC2-Classic, default VPC] The AWS account number for the source security - // group. For EC2-VPC, the source security group must be in the same VPC. You - // can't specify this parameter in combination with the following parameters: - // the CIDR IP address range, the IP protocol, the start of the port range, - // and the end of the port range. Creates rules that grant full ICMP, UDP, and - // TCP access. To create a rule with a specific IP protocol and port range, - // use a set of IP permissions instead. + // [EC2-Classic] The AWS account number for the source security group, if the + // source security group is in a different account. You can't specify this parameter + // in combination with the following parameters: the CIDR IP address range, + // the IP protocol, the start of the port range, and the end of the port range. + // Creates rules that grant full ICMP, UDP, and TCP access. To create a rule + // with a specific IP protocol and port range, use a set of IP permissions instead. SourceSecurityGroupOwnerId *string `type:"string"` // The end of port range for the TCP and UDP protocols, or an ICMP code number. @@ -8035,6 +8301,7 @@ func (s BlockDeviceMapping) GoString() string { return s.String() } +// Contains the parameters for BundleInstance. type BundleInstanceInput struct { _ struct{} `type:"structure"` @@ -8069,6 +8336,23 @@ func (s BundleInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BundleInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BundleInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.Storage == nil { + invalidParams.Add(request.NewErrParamRequired("Storage")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of BundleInstance. type BundleInstanceOutput struct { _ struct{} `type:"structure"` @@ -8146,6 +8430,7 @@ func (s BundleTaskError) GoString() string { return s.String() } +// Contains the parameters for CancelBundleTask. type CancelBundleTaskInput struct { _ struct{} `type:"structure"` @@ -8169,6 +8454,20 @@ func (s CancelBundleTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelBundleTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelBundleTaskInput"} + if s.BundleId == nil { + invalidParams.Add(request.NewErrParamRequired("BundleId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CancelBundleTask. type CancelBundleTaskOutput struct { _ struct{} `type:"structure"` @@ -8186,6 +8485,7 @@ func (s CancelBundleTaskOutput) GoString() string { return s.String() } +// Contains the parameters for CancelConversionTask. type CancelConversionTaskInput struct { _ struct{} `type:"structure"` @@ -8212,6 +8512,19 @@ func (s CancelConversionTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelConversionTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelConversionTaskInput"} + if s.ConversionTaskId == nil { + invalidParams.Add(request.NewErrParamRequired("ConversionTaskId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CancelConversionTaskOutput struct { _ struct{} `type:"structure"` } @@ -8226,6 +8539,7 @@ func (s CancelConversionTaskOutput) GoString() string { return s.String() } +// Contains the parameters for CancelExportTask. type CancelExportTaskInput struct { _ struct{} `type:"structure"` @@ -8243,6 +8557,19 @@ func (s CancelExportTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} + if s.ExportTaskId == nil { + invalidParams.Add(request.NewErrParamRequired("ExportTaskId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CancelExportTaskOutput struct { _ struct{} `type:"structure"` } @@ -8257,6 +8584,7 @@ func (s CancelExportTaskOutput) GoString() string { return s.String() } +// Contains the parameters for CancelImportTask. type CancelImportTaskInput struct { _ struct{} `type:"structure"` @@ -8283,6 +8611,7 @@ func (s CancelImportTaskInput) GoString() string { return s.String() } +// Contains the output for CancelImportTask. type CancelImportTaskOutput struct { _ struct{} `type:"structure"` @@ -8306,6 +8635,7 @@ func (s CancelImportTaskOutput) GoString() string { return s.String() } +// Contains the parameters for CancelReservedInstancesListing. type CancelReservedInstancesListingInput struct { _ struct{} `type:"structure"` @@ -8323,6 +8653,20 @@ func (s CancelReservedInstancesListingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelReservedInstancesListingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelReservedInstancesListingInput"} + if s.ReservedInstancesListingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesListingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CancelReservedInstancesListing. type CancelReservedInstancesListingOutput struct { _ struct{} `type:"structure"` @@ -8410,6 +8754,22 @@ func (s CancelSpotFleetRequestsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelSpotFleetRequestsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelSpotFleetRequestsInput"} + if s.SpotFleetRequestIds == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestIds")) + } + if s.TerminateInstances == nil { + invalidParams.Add(request.NewErrParamRequired("TerminateInstances")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of CancelSpotFleetRequests. type CancelSpotFleetRequestsOutput struct { _ struct{} `type:"structure"` @@ -8479,6 +8839,19 @@ func (s CancelSpotInstanceRequestsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelSpotInstanceRequestsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelSpotInstanceRequestsInput"} + if s.SpotInstanceRequestIds == nil { + invalidParams.Add(request.NewErrParamRequired("SpotInstanceRequestIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of CancelSpotInstanceRequests. type CancelSpotInstanceRequestsOutput struct { _ struct{} `type:"structure"` @@ -8593,6 +8966,7 @@ func (s ClientData) GoString() string { return s.String() } +// Contains the parameters for ConfirmProductInstance. type ConfirmProductInstanceInput struct { _ struct{} `type:"structure"` @@ -8619,6 +8993,23 @@ func (s ConfirmProductInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfirmProductInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfirmProductInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.ProductCode == nil { + invalidParams.Add(request.NewErrParamRequired("ProductCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ConfirmProductInstance. type ConfirmProductInstanceOutput struct { _ struct{} `type:"structure"` @@ -8680,6 +9071,7 @@ func (s ConversionTask) GoString() string { return s.String() } +// Contains the parameters for CopyImage. type CopyImageInput struct { _ struct{} `type:"structure"` @@ -8734,6 +9126,26 @@ func (s CopyImageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyImageInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.SourceImageId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceImageId")) + } + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CopyImage. type CopyImageOutput struct { _ struct{} `type:"structure"` @@ -8751,6 +9163,7 @@ func (s CopyImageOutput) GoString() string { return s.String() } +// Contains the parameters for CopySnapshot. type CopySnapshotInput struct { _ struct{} `type:"structure"` @@ -8823,6 +9236,23 @@ func (s CopySnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopySnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) + } + if s.SourceSnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CopySnapshot. type CopySnapshotOutput struct { _ struct{} `type:"structure"` @@ -8840,6 +9270,7 @@ func (s CopySnapshotOutput) GoString() string { return s.String() } +// Contains the parameters for CreateCustomerGateway. type CreateCustomerGatewayInput struct { _ struct{} `type:"structure"` @@ -8872,6 +9303,26 @@ func (s CreateCustomerGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCustomerGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCustomerGatewayInput"} + if s.BgpAsn == nil { + invalidParams.Add(request.NewErrParamRequired("BgpAsn")) + } + if s.PublicIp == nil { + invalidParams.Add(request.NewErrParamRequired("PublicIp")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateCustomerGateway. type CreateCustomerGatewayOutput struct { _ struct{} `type:"structure"` @@ -8889,6 +9340,7 @@ func (s CreateCustomerGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for CreateDhcpOptions. type CreateDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -8912,6 +9364,20 @@ func (s CreateDhcpOptionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDhcpOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDhcpOptionsInput"} + if s.DhcpConfigurations == nil { + invalidParams.Add(request.NewErrParamRequired("DhcpConfigurations")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateDhcpOptions. type CreateDhcpOptionsOutput struct { _ struct{} `type:"structure"` @@ -8929,6 +9395,7 @@ func (s CreateDhcpOptionsOutput) GoString() string { return s.String() } +// Contains the parameters for CreateFlowLogs. type CreateFlowLogsInput struct { _ struct{} `type:"structure"` @@ -8963,6 +9430,32 @@ func (s CreateFlowLogsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFlowLogsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFlowLogsInput"} + if s.DeliverLogsPermissionArn == nil { + invalidParams.Add(request.NewErrParamRequired("DeliverLogsPermissionArn")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.ResourceIds == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIds")) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.TrafficType == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateFlowLogs. type CreateFlowLogsOutput struct { _ struct{} `type:"structure"` @@ -8987,6 +9480,7 @@ func (s CreateFlowLogsOutput) GoString() string { return s.String() } +// Contains the parameters for CreateImage. type CreateImageInput struct { _ struct{} `type:"structure"` @@ -9012,11 +9506,10 @@ type CreateImageInput struct { // at-signs (@), or underscores(_) Name *string `locationName:"name" type:"string" required:"true"` - // By default, this parameter is set to false, which means Amazon EC2 attempts - // to shut down the instance cleanly before image creation and then reboots - // the instance. When the parameter is set to true, Amazon EC2 doesn't shut - // down the instance before creating the image. When this option is used, file - // system integrity on the created image can't be guaranteed. + // By default, Amazon EC2 attempts to shut down and reboot the instance before + // creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't + // shut down the instance before creating the image. When this option is used, + // file system integrity on the created image can't be guaranteed. NoReboot *bool `locationName:"noReboot" type:"boolean"` } @@ -9030,6 +9523,23 @@ func (s CreateImageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateImageInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateImage. type CreateImageOutput struct { _ struct{} `type:"structure"` @@ -9047,6 +9557,7 @@ func (s CreateImageOutput) GoString() string { return s.String() } +// Contains the parameters for CreateInstanceExportTask. type CreateInstanceExportTaskInput struct { _ struct{} `type:"structure"` @@ -9074,6 +9585,20 @@ func (s CreateInstanceExportTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstanceExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceExportTaskInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output for CreateInstanceExportTask. type CreateInstanceExportTaskOutput struct { _ struct{} `type:"structure"` @@ -9091,6 +9616,7 @@ func (s CreateInstanceExportTaskOutput) GoString() string { return s.String() } +// Contains the parameters for CreateInternetGateway. type CreateInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -9111,6 +9637,7 @@ func (s CreateInternetGatewayInput) GoString() string { return s.String() } +// Contains the output of CreateInternetGateway. type CreateInternetGatewayOutput struct { _ struct{} `type:"structure"` @@ -9128,6 +9655,7 @@ func (s CreateInternetGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for CreateKeyPair. type CreateKeyPairInput struct { _ struct{} `type:"structure"` @@ -9153,6 +9681,19 @@ func (s CreateKeyPairInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} + if s.KeyName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a key pair. type CreateKeyPairOutput struct { _ struct{} `type:"structure"` @@ -9177,6 +9718,7 @@ func (s CreateKeyPairOutput) GoString() string { return s.String() } +// Contains the parameters for CreateNatGateway. type CreateNatGatewayInput struct { _ struct{} `type:"structure"` @@ -9205,6 +9747,23 @@ func (s CreateNatGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNatGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNatGatewayInput"} + if s.AllocationId == nil { + invalidParams.Add(request.NewErrParamRequired("AllocationId")) + } + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateNatGateway. type CreateNatGatewayOutput struct { _ struct{} `type:"structure"` @@ -9226,6 +9785,7 @@ func (s CreateNatGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for CreateNetworkAclEntry. type CreateNetworkAclEntryInput struct { _ struct{} `type:"structure"` @@ -9275,6 +9835,34 @@ func (s CreateNetworkAclEntryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNetworkAclEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclEntryInput"} + if s.CidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("CidrBlock")) + } + if s.Egress == nil { + invalidParams.Add(request.NewErrParamRequired("Egress")) + } + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.RuleAction == nil { + invalidParams.Add(request.NewErrParamRequired("RuleAction")) + } + if s.RuleNumber == nil { + invalidParams.Add(request.NewErrParamRequired("RuleNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateNetworkAclEntryOutput struct { _ struct{} `type:"structure"` } @@ -9289,6 +9877,7 @@ func (s CreateNetworkAclEntryOutput) GoString() string { return s.String() } +// Contains the parameters for CreateNetworkAcl. type CreateNetworkAclInput struct { _ struct{} `type:"structure"` @@ -9312,6 +9901,20 @@ func (s CreateNetworkAclInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNetworkAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateNetworkAcl. type CreateNetworkAclOutput struct { _ struct{} `type:"structure"` @@ -9329,6 +9932,7 @@ func (s CreateNetworkAclOutput) GoString() string { return s.String() } +// Contains the parameters for CreateNetworkInterface. type CreateNetworkInterfaceInput struct { _ struct{} `type:"structure"` @@ -9378,6 +9982,30 @@ func (s CreateNetworkInterfaceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNetworkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfaceInput"} + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + if s.PrivateIpAddresses != nil { + for i, v := range s.PrivateIpAddresses { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateNetworkInterface. type CreateNetworkInterfaceOutput struct { _ struct{} `type:"structure"` @@ -9395,6 +10023,7 @@ func (s CreateNetworkInterfaceOutput) GoString() string { return s.String() } +// Contains the parameters for CreatePlacementGroup. type CreatePlacementGroupInput struct { _ struct{} `type:"structure"` @@ -9423,6 +10052,22 @@ func (s CreatePlacementGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePlacementGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePlacementGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.Strategy == nil { + invalidParams.Add(request.NewErrParamRequired("Strategy")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreatePlacementGroupOutput struct { _ struct{} `type:"structure"` } @@ -9437,6 +10082,7 @@ func (s CreatePlacementGroupOutput) GoString() string { return s.String() } +// Contains the parameters for CreateReservedInstancesListing. type CreateReservedInstancesListingInput struct { _ struct{} `type:"structure"` @@ -9469,6 +10115,29 @@ func (s CreateReservedInstancesListingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateReservedInstancesListingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateReservedInstancesListingInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.PriceSchedules == nil { + invalidParams.Add(request.NewErrParamRequired("PriceSchedules")) + } + if s.ReservedInstancesId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateReservedInstancesListing. type CreateReservedInstancesListingOutput struct { _ struct{} `type:"structure"` @@ -9486,6 +10155,7 @@ func (s CreateReservedInstancesListingOutput) GoString() string { return s.String() } +// Contains the parameters for CreateRoute. type CreateRouteInput struct { _ struct{} `type:"structure"` @@ -9530,6 +10200,23 @@ func (s CreateRouteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateRoute. type CreateRouteOutput struct { _ struct{} `type:"structure"` @@ -9547,6 +10234,7 @@ func (s CreateRouteOutput) GoString() string { return s.String() } +// Contains the parameters for CreateRouteTable. type CreateRouteTableInput struct { _ struct{} `type:"structure"` @@ -9570,6 +10258,20 @@ func (s CreateRouteTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRouteTableInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateRouteTable. type CreateRouteTableOutput struct { _ struct{} `type:"structure"` @@ -9587,6 +10289,7 @@ func (s CreateRouteTableOutput) GoString() string { return s.String() } +// Contains the parameters for CreateSecurityGroup. type CreateSecurityGroupInput struct { _ struct{} `type:"structure"` @@ -9628,6 +10331,23 @@ func (s CreateSecurityGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSecurityGroupInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateSecurityGroup. type CreateSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -9645,6 +10365,7 @@ func (s CreateSecurityGroupOutput) GoString() string { return s.String() } +// Contains the parameters for CreateSnapshot. type CreateSnapshotInput struct { _ struct{} `type:"structure"` @@ -9671,6 +10392,19 @@ func (s CreateSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the parameters for CreateSpotDatafeedSubscription. type CreateSpotDatafeedSubscriptionInput struct { _ struct{} `type:"structure"` @@ -9698,6 +10432,19 @@ func (s CreateSpotDatafeedSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSpotDatafeedSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSpotDatafeedSubscriptionInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of CreateSpotDatafeedSubscription. type CreateSpotDatafeedSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -9716,6 +10463,7 @@ func (s CreateSpotDatafeedSubscriptionOutput) GoString() string { return s.String() } +// Contains the parameters for CreateSubnet. type CreateSubnetInput struct { _ struct{} `type:"structure"` @@ -9748,6 +10496,23 @@ func (s CreateSubnetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSubnetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSubnetInput"} + if s.CidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("CidrBlock")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateSubnet. type CreateSubnetOutput struct { _ struct{} `type:"structure"` @@ -9765,6 +10530,7 @@ func (s CreateSubnetOutput) GoString() string { return s.String() } +// Contains the parameters for CreateTags. type CreateTagsInput struct { _ struct{} `type:"structure"` @@ -9793,6 +10559,22 @@ func (s CreateTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} + if s.Resources == nil { + invalidParams.Add(request.NewErrParamRequired("Resources")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateTagsOutput struct { _ struct{} `type:"structure"` } @@ -9807,6 +10589,7 @@ func (s CreateTagsOutput) GoString() string { return s.String() } +// Contains the parameters for CreateVolume. type CreateVolumeInput struct { _ struct{} `type:"structure"` @@ -9829,11 +10612,11 @@ type CreateVolumeInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // Only valid for Provisioned IOPS (SSD) volumes. The number of I/O operations + // Only valid for Provisioned IOPS SSD volumes. The number of I/O operations // per second (IOPS) to provision for the volume, with a maximum ratio of 30 // IOPS/GiB. // - // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes + // Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes Iops *int64 `type:"integer"` // The full ARN of the AWS Key Management Service (AWS KMS) customer master @@ -9847,9 +10630,9 @@ type CreateVolumeInput struct { // The size of the volume, in GiBs. // - // Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 - // for io1 volumes. If you specify a snapshot, the volume size must be equal - // to or larger than the snapshot size. + // Constraints: 1-16384 for gp2, 4-16384 for io1, 500-16384 for st1, 500-16384 + // for sc1, and 1-1024 for standard. If you specify a snapshot, the volume size + // must be equal to or larger than the snapshot size. // // Default: If you're creating the volume from a snapshot and don't specify // a volume size, the default is the snapshot size. @@ -9858,8 +10641,9 @@ type CreateVolumeInput struct { // The snapshot from which to create the volume. SnapshotId *string `type:"string"` - // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for - // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes. + // The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned + // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard + // for Magnetic volumes. // // Default: standard VolumeType *string `type:"string" enum:"VolumeType"` @@ -9875,6 +10659,19 @@ func (s CreateVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVolumeInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the user or group to be added or removed from the permissions for // a volume. type CreateVolumePermission struct { @@ -9922,6 +10719,7 @@ func (s CreateVolumePermissionModifications) GoString() string { return s.String() } +// Contains the parameters for CreateVpcEndpoint. type CreateVpcEndpointInput struct { _ struct{} `type:"structure"` @@ -9961,6 +10759,23 @@ func (s CreateVpcEndpointInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVpcEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointInput"} + if s.ServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceName")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateVpcEndpoint. type CreateVpcEndpointOutput struct { _ struct{} `type:"structure"` @@ -9982,6 +10797,7 @@ func (s CreateVpcEndpointOutput) GoString() string { return s.String() } +// Contains the parameters for CreateVpc. type CreateVpcInput struct { _ struct{} `type:"structure"` @@ -9994,11 +10810,11 @@ type CreateVpcInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The supported tenancy options for instances launched into the VPC. A value - // of default means that instances can be launched with any tenancy; a value - // of dedicated means all instances launched into the VPC are launched as dedicated - // tenancy instances regardless of the tenancy assigned to the instance at launch. - // Dedicated tenancy instances run on single-tenant hardware. + // The tenancy options for instances launched into the VPC. For default, instances + // are launched with shared tenancy by default. You can launch instances with + // any tenancy into a shared tenancy VPC. For dedicated, instances are launched + // as dedicated tenancy instances by default. You can only launch instances + // with a tenancy of dedicated or host into a dedicated tenancy VPC. // // Important: The host value cannot be used with this parameter. Use the default // or dedicated values only. @@ -10017,6 +10833,20 @@ func (s CreateVpcInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpcInput"} + if s.CidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("CidrBlock")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateVpc. type CreateVpcOutput struct { _ struct{} `type:"structure"` @@ -10034,6 +10864,7 @@ func (s CreateVpcOutput) GoString() string { return s.String() } +// Contains the parameters for CreateVpcPeeringConnection. type CreateVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -10065,6 +10896,7 @@ func (s CreateVpcPeeringConnectionInput) GoString() string { return s.String() } +// Contains the output of CreateVpcPeeringConnection. type CreateVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -10082,6 +10914,7 @@ func (s CreateVpcPeeringConnectionOutput) GoString() string { return s.String() } +// Contains the parameters for CreateVpnConnection. type CreateVpnConnectionInput struct { _ struct{} `type:"structure"` @@ -10118,6 +10951,26 @@ func (s CreateVpnConnectionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVpnConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionInput"} + if s.CustomerGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.VpnGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateVpnConnection. type CreateVpnConnectionOutput struct { _ struct{} `type:"structure"` @@ -10135,6 +10988,7 @@ func (s CreateVpnConnectionOutput) GoString() string { return s.String() } +// Contains the parameters for CreateVpnConnectionRoute. type CreateVpnConnectionRouteInput struct { _ struct{} `type:"structure"` @@ -10155,6 +11009,22 @@ func (s CreateVpnConnectionRouteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVpnConnectionRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateVpnConnectionRouteOutput struct { _ struct{} `type:"structure"` } @@ -10169,6 +11039,7 @@ func (s CreateVpnConnectionRouteOutput) GoString() string { return s.String() } +// Contains the parameters for CreateVpnGateway. type CreateVpnGatewayInput struct { _ struct{} `type:"structure"` @@ -10195,6 +11066,20 @@ func (s CreateVpnGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVpnGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpnGatewayInput"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of CreateVpnGateway. type CreateVpnGatewayOutput struct { _ struct{} `type:"structure"` @@ -10247,6 +11132,7 @@ func (s CustomerGateway) GoString() string { return s.String() } +// Contains the parameters for DeleteCustomerGateway. type DeleteCustomerGatewayInput struct { _ struct{} `type:"structure"` @@ -10270,6 +11156,19 @@ func (s DeleteCustomerGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCustomerGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCustomerGatewayInput"} + if s.CustomerGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteCustomerGatewayOutput struct { _ struct{} `type:"structure"` } @@ -10284,6 +11183,7 @@ func (s DeleteCustomerGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteDhcpOptions. type DeleteDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -10307,6 +11207,19 @@ func (s DeleteDhcpOptionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDhcpOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDhcpOptionsInput"} + if s.DhcpOptionsId == nil { + invalidParams.Add(request.NewErrParamRequired("DhcpOptionsId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDhcpOptionsOutput struct { _ struct{} `type:"structure"` } @@ -10321,6 +11234,7 @@ func (s DeleteDhcpOptionsOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteFlowLogs. type DeleteFlowLogsInput struct { _ struct{} `type:"structure"` @@ -10338,6 +11252,20 @@ func (s DeleteFlowLogsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFlowLogsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFlowLogsInput"} + if s.FlowLogIds == nil { + invalidParams.Add(request.NewErrParamRequired("FlowLogIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DeleteFlowLogs. type DeleteFlowLogsOutput struct { _ struct{} `type:"structure"` @@ -10355,6 +11283,7 @@ func (s DeleteFlowLogsOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteInternetGateway. type DeleteInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -10378,6 +11307,19 @@ func (s DeleteInternetGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInternetGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInternetGatewayInput"} + if s.InternetGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteInternetGatewayOutput struct { _ struct{} `type:"structure"` } @@ -10392,6 +11334,7 @@ func (s DeleteInternetGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteKeyPair. type DeleteKeyPairInput struct { _ struct{} `type:"structure"` @@ -10415,6 +11358,19 @@ func (s DeleteKeyPairInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} + if s.KeyName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteKeyPairOutput struct { _ struct{} `type:"structure"` } @@ -10429,6 +11385,7 @@ func (s DeleteKeyPairOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteNatGateway. type DeleteNatGatewayInput struct { _ struct{} `type:"structure"` @@ -10446,6 +11403,20 @@ func (s DeleteNatGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNatGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNatGatewayInput"} + if s.NatGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("NatGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DeleteNatGateway. type DeleteNatGatewayOutput struct { _ struct{} `type:"structure"` @@ -10463,6 +11434,7 @@ func (s DeleteNatGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteNetworkAclEntry. type DeleteNetworkAclEntryInput struct { _ struct{} `type:"structure"` @@ -10492,6 +11464,25 @@ func (s DeleteNetworkAclEntryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkAclEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclEntryInput"} + if s.Egress == nil { + invalidParams.Add(request.NewErrParamRequired("Egress")) + } + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + if s.RuleNumber == nil { + invalidParams.Add(request.NewErrParamRequired("RuleNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteNetworkAclEntryOutput struct { _ struct{} `type:"structure"` } @@ -10506,6 +11497,7 @@ func (s DeleteNetworkAclEntryOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteNetworkAcl. type DeleteNetworkAclInput struct { _ struct{} `type:"structure"` @@ -10529,6 +11521,19 @@ func (s DeleteNetworkAclInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclInput"} + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteNetworkAclOutput struct { _ struct{} `type:"structure"` } @@ -10543,6 +11548,7 @@ func (s DeleteNetworkAclOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteNetworkInterface. type DeleteNetworkInterfaceInput struct { _ struct{} `type:"structure"` @@ -10566,6 +11572,19 @@ func (s DeleteNetworkInterfaceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfaceInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteNetworkInterfaceOutput struct { _ struct{} `type:"structure"` } @@ -10580,6 +11599,7 @@ func (s DeleteNetworkInterfaceOutput) GoString() string { return s.String() } +// Contains the parameters for DeletePlacementGroup. type DeletePlacementGroupInput struct { _ struct{} `type:"structure"` @@ -10603,6 +11623,19 @@ func (s DeletePlacementGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePlacementGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePlacementGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeletePlacementGroupOutput struct { _ struct{} `type:"structure"` } @@ -10617,6 +11650,7 @@ func (s DeletePlacementGroupOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteRoute. type DeleteRouteInput struct { _ struct{} `type:"structure"` @@ -10644,6 +11678,22 @@ func (s DeleteRouteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRouteOutput struct { _ struct{} `type:"structure"` } @@ -10658,6 +11708,7 @@ func (s DeleteRouteOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteRouteTable. type DeleteRouteTableInput struct { _ struct{} `type:"structure"` @@ -10681,6 +11732,19 @@ func (s DeleteRouteTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRouteTableInput"} + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRouteTableOutput struct { _ struct{} `type:"structure"` } @@ -10695,6 +11759,7 @@ func (s DeleteRouteTableOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteSecurityGroup. type DeleteSecurityGroupInput struct { _ struct{} `type:"structure"` @@ -10736,6 +11801,7 @@ func (s DeleteSecurityGroupOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteSnapshot. type DeleteSnapshotInput struct { _ struct{} `type:"structure"` @@ -10759,6 +11825,19 @@ func (s DeleteSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSnapshotOutput struct { _ struct{} `type:"structure"` } @@ -10808,6 +11887,7 @@ func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteSubnet. type DeleteSubnetInput struct { _ struct{} `type:"structure"` @@ -10831,6 +11911,19 @@ func (s DeleteSubnetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSubnetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubnetInput"} + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSubnetOutput struct { _ struct{} `type:"structure"` } @@ -10845,6 +11938,7 @@ func (s DeleteSubnetOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteTags. type DeleteTagsInput struct { _ struct{} `type:"structure"` @@ -10874,6 +11968,19 @@ func (s DeleteTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + if s.Resources == nil { + invalidParams.Add(request.NewErrParamRequired("Resources")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteTagsOutput struct { _ struct{} `type:"structure"` } @@ -10888,6 +11995,7 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteVolume. type DeleteVolumeInput struct { _ struct{} `type:"structure"` @@ -10911,6 +12019,19 @@ func (s DeleteVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVolumeOutput struct { _ struct{} `type:"structure"` } @@ -10925,6 +12046,7 @@ func (s DeleteVolumeOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteVpcEndpoints. type DeleteVpcEndpointsInput struct { _ struct{} `type:"structure"` @@ -10948,6 +12070,20 @@ func (s DeleteVpcEndpointsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpcEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointsInput"} + if s.VpcEndpointIds == nil { + invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DeleteVpcEndpoints. type DeleteVpcEndpointsOutput struct { _ struct{} `type:"structure"` @@ -10965,6 +12101,7 @@ func (s DeleteVpcEndpointsOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteVpc. type DeleteVpcInput struct { _ struct{} `type:"structure"` @@ -10988,6 +12125,19 @@ func (s DeleteVpcInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVpcOutput struct { _ struct{} `type:"structure"` } @@ -11002,6 +12152,7 @@ func (s DeleteVpcOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteVpcPeeringConnection. type DeleteVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -11025,6 +12176,20 @@ func (s DeleteVpcPeeringConnectionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpcPeeringConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcPeeringConnectionInput"} + if s.VpcPeeringConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DeleteVpcPeeringConnection. type DeleteVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -11042,6 +12207,7 @@ func (s DeleteVpcPeeringConnectionOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteVpnConnection. type DeleteVpnConnectionInput struct { _ struct{} `type:"structure"` @@ -11065,6 +12231,19 @@ func (s DeleteVpnConnectionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpnConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionInput"} + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVpnConnectionOutput struct { _ struct{} `type:"structure"` } @@ -11079,6 +12258,7 @@ func (s DeleteVpnConnectionOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteVpnConnectionRoute. type DeleteVpnConnectionRouteInput struct { _ struct{} `type:"structure"` @@ -11099,6 +12279,22 @@ func (s DeleteVpnConnectionRouteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpnConnectionRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVpnConnectionRouteOutput struct { _ struct{} `type:"structure"` } @@ -11113,6 +12309,7 @@ func (s DeleteVpnConnectionRouteOutput) GoString() string { return s.String() } +// Contains the parameters for DeleteVpnGateway. type DeleteVpnGatewayInput struct { _ struct{} `type:"structure"` @@ -11136,6 +12333,19 @@ func (s DeleteVpnGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpnGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpnGatewayInput"} + if s.VpnGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVpnGatewayOutput struct { _ struct{} `type:"structure"` } @@ -11150,6 +12360,7 @@ func (s DeleteVpnGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for DeregisterImage. type DeregisterImageInput struct { _ struct{} `type:"structure"` @@ -11173,6 +12384,19 @@ func (s DeregisterImageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterImageInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterImageOutput struct { _ struct{} `type:"structure"` } @@ -11187,6 +12411,7 @@ func (s DeregisterImageOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeAccountAttributes. type DescribeAccountAttributesInput struct { _ struct{} `type:"structure"` @@ -11210,6 +12435,7 @@ func (s DescribeAccountAttributesInput) GoString() string { return s.String() } +// Contains the output of DescribeAccountAttributes. type DescribeAccountAttributesOutput struct { _ struct{} `type:"structure"` @@ -11227,6 +12453,7 @@ func (s DescribeAccountAttributesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeAddresses. type DescribeAddressesInput struct { _ struct{} `type:"structure"` @@ -11280,6 +12507,7 @@ func (s DescribeAddressesInput) GoString() string { return s.String() } +// Contains the output of DescribeAddresses. type DescribeAddressesOutput struct { _ struct{} `type:"structure"` @@ -11297,6 +12525,7 @@ func (s DescribeAddressesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeAvailabilityZones. type DescribeAvailabilityZonesInput struct { _ struct{} `type:"structure"` @@ -11333,6 +12562,7 @@ func (s DescribeAvailabilityZonesInput) GoString() string { return s.String() } +// Contains the output of DescribeAvailabiltyZones. type DescribeAvailabilityZonesOutput struct { _ struct{} `type:"structure"` @@ -11350,6 +12580,7 @@ func (s DescribeAvailabilityZonesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeBundleTasks. type DescribeBundleTasksInput struct { _ struct{} `type:"structure"` @@ -11400,6 +12631,7 @@ func (s DescribeBundleTasksInput) GoString() string { return s.String() } +// Contains the output of DescribeBundleTasks. type DescribeBundleTasksOutput struct { _ struct{} `type:"structure"` @@ -11417,6 +12649,7 @@ func (s DescribeBundleTasksOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeClassicLinkInstances. type DescribeClassicLinkInstancesInput struct { _ struct{} `type:"structure"` @@ -11474,6 +12707,7 @@ func (s DescribeClassicLinkInstancesInput) GoString() string { return s.String() } +// Contains the output of DescribeClassicLinkInstances. type DescribeClassicLinkInstancesOutput struct { _ struct{} `type:"structure"` @@ -11495,6 +12729,7 @@ func (s DescribeClassicLinkInstancesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeConversionTasks. type DescribeConversionTasksInput struct { _ struct{} `type:"structure"` @@ -11521,6 +12756,7 @@ func (s DescribeConversionTasksInput) GoString() string { return s.String() } +// Contains the output for DescribeConversionTasks. type DescribeConversionTasksOutput struct { _ struct{} `type:"structure"` @@ -11538,6 +12774,7 @@ func (s DescribeConversionTasksOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeCustomerGateways. type DescribeCustomerGatewaysInput struct { _ struct{} `type:"structure"` @@ -11592,6 +12829,7 @@ func (s DescribeCustomerGatewaysInput) GoString() string { return s.String() } +// Contains the output of DescribeCustomerGateways. type DescribeCustomerGatewaysOutput struct { _ struct{} `type:"structure"` @@ -11609,6 +12847,7 @@ func (s DescribeCustomerGatewaysOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeDhcpOptions. type DescribeDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -11655,6 +12894,7 @@ func (s DescribeDhcpOptionsInput) GoString() string { return s.String() } +// Contains the output of DescribeDhcpOptions. type DescribeDhcpOptionsOutput struct { _ struct{} `type:"structure"` @@ -11672,6 +12912,7 @@ func (s DescribeDhcpOptionsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeExportTasks. type DescribeExportTasksInput struct { _ struct{} `type:"structure"` @@ -11689,6 +12930,7 @@ func (s DescribeExportTasksInput) GoString() string { return s.String() } +// Contains the output for DescribeExportTasks. type DescribeExportTasksOutput struct { _ struct{} `type:"structure"` @@ -11706,6 +12948,7 @@ func (s DescribeExportTasksOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeFlowLogs. type DescribeFlowLogsInput struct { _ struct{} `type:"structure"` @@ -11746,6 +12989,7 @@ func (s DescribeFlowLogsInput) GoString() string { return s.String() } +// Contains the output of DescribeFlowLogs. type DescribeFlowLogsOutput struct { _ struct{} `type:"structure"` @@ -11767,6 +13011,7 @@ func (s DescribeFlowLogsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeHosts. type DescribeHostsInput struct { _ struct{} `type:"structure"` @@ -11812,6 +13057,7 @@ func (s DescribeHostsInput) GoString() string { return s.String() } +// Contains the output of DescribeHosts. type DescribeHostsOutput struct { _ struct{} `type:"structure"` @@ -11833,6 +13079,7 @@ func (s DescribeHostsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeIdFormat. type DescribeIdFormatInput struct { _ struct{} `type:"structure"` @@ -11850,6 +13097,7 @@ func (s DescribeIdFormatInput) GoString() string { return s.String() } +// Contains the output of DescribeIdFormat. type DescribeIdFormatOutput struct { _ struct{} `type:"structure"` @@ -11867,6 +13115,7 @@ func (s DescribeIdFormatOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeImageAttribute. type DescribeImageAttributeInput struct { _ struct{} `type:"structure"` @@ -11897,6 +13146,22 @@ func (s DescribeImageAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeImageAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes an image attribute. type DescribeImageAttributeOutput struct { _ struct{} `type:"structure"` @@ -11936,6 +13201,7 @@ func (s DescribeImageAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeImages. type DescribeImagesInput struct { _ struct{} `type:"structure"` @@ -11966,7 +13232,7 @@ type DescribeImagesInput struct { // in GiB. // // block-device-mapping.volume-type - The volume type of the EBS volume (gp2 - // | standard | io1). + // | io1 | st1 | sc1 | standard). // // description - The description of the image (provided during image creation). // @@ -12043,6 +13309,7 @@ func (s DescribeImagesInput) GoString() string { return s.String() } +// Contains the output of DescribeImages. type DescribeImagesOutput struct { _ struct{} `type:"structure"` @@ -12060,6 +13327,7 @@ func (s DescribeImagesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeImportImageTasks. type DescribeImportImageTasksInput struct { _ struct{} `type:"structure"` @@ -12069,13 +13337,15 @@ type DescribeImportImageTasksInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more filters. + // Filter tasks using the task-state filter and one of the following values: + // active, completed, deleting, deleted. Filters []*Filter `locationNameList:"Filter" type:"list"` // A list of import image task IDs. ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` - // The maximum number of results to return in a single request. + // 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 `type:"integer"` // A token that indicates the next page of results. @@ -12092,6 +13362,7 @@ func (s DescribeImportImageTasksInput) GoString() string { return s.String() } +// Contains the output for DescribeImportImageTasks. type DescribeImportImageTasksOutput struct { _ struct{} `type:"structure"` @@ -12114,6 +13385,7 @@ func (s DescribeImportImageTasksOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeImportSnapshotTasks. type DescribeImportSnapshotTasksInput struct { _ struct{} `type:"structure"` @@ -12129,7 +13401,8 @@ type DescribeImportSnapshotTasksInput struct { // A list of import snapshot task IDs. ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` - // The maximum number of results to return in a single request. + // 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 `type:"integer"` // A token that indicates the next page of results. @@ -12146,6 +13419,7 @@ func (s DescribeImportSnapshotTasksInput) GoString() string { return s.String() } +// Contains the output for DescribeImportSnapshotTasks. type DescribeImportSnapshotTasksOutput struct { _ struct{} `type:"structure"` @@ -12168,6 +13442,7 @@ func (s DescribeImportSnapshotTasksOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeInstanceAttribute. type DescribeInstanceAttributeInput struct { _ struct{} `type:"structure"` @@ -12194,6 +13469,22 @@ func (s DescribeInstanceAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInstanceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes an instance attribute. type DescribeInstanceAttributeOutput struct { _ struct{} `type:"structure"` @@ -12255,6 +13546,7 @@ func (s DescribeInstanceAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeInstanceStatus. type DescribeInstanceStatusInput struct { _ struct{} `type:"structure"` @@ -12314,12 +13606,10 @@ type DescribeInstanceStatusInput struct { // Constraints: Maximum 100 explicitly specified instance IDs. InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. You cannot specify this parameter and the instance IDs parameter - // in the same request. + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. This + // value can be between 5 and 1000. You cannot specify this parameter and the + // instance IDs parameter in the same call. MaxResults *int64 `type:"integer"` // The token to retrieve the next page of results. @@ -12336,6 +13626,7 @@ func (s DescribeInstanceStatusInput) GoString() string { return s.String() } +// Contains the output of DescribeInstanceStatus. type DescribeInstanceStatusOutput struct { _ struct{} `type:"structure"` @@ -12357,6 +13648,7 @@ func (s DescribeInstanceStatusOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeInstances. type DescribeInstancesInput struct { _ struct{} `type:"structure"` @@ -12603,12 +13895,10 @@ type DescribeInstancesInput struct { // Default: Describes all your instances. InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. You cannot specify this parameter and the instance IDs parameter - // in the same request. + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. This + // value can be between 5 and 1000. You cannot specify this parameter and the + // instance IDs parameter in the same call. MaxResults *int64 `locationName:"maxResults" type:"integer"` // The token to request the next page of results. @@ -12625,6 +13915,7 @@ func (s DescribeInstancesInput) GoString() string { return s.String() } +// Contains the output of DescribeInstances. type DescribeInstancesOutput struct { _ struct{} `type:"structure"` @@ -12646,6 +13937,7 @@ func (s DescribeInstancesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeInternetGateways. type DescribeInternetGatewaysInput struct { _ struct{} `type:"structure"` @@ -12693,6 +13985,7 @@ func (s DescribeInternetGatewaysInput) GoString() string { return s.String() } +// Contains the output of DescribeInternetGateways. type DescribeInternetGatewaysOutput struct { _ struct{} `type:"structure"` @@ -12710,6 +14003,7 @@ func (s DescribeInternetGatewaysOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeKeyPairs. type DescribeKeyPairsInput struct { _ struct{} `type:"structure"` @@ -12742,6 +14036,7 @@ func (s DescribeKeyPairsInput) GoString() string { return s.String() } +// Contains the output of DescribeKeyPairs. type DescribeKeyPairsOutput struct { _ struct{} `type:"structure"` @@ -12759,6 +14054,7 @@ func (s DescribeKeyPairsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeMovingAddresses. type DescribeMovingAddressesInput struct { _ struct{} `type:"structure"` @@ -12798,6 +14094,7 @@ func (s DescribeMovingAddressesInput) GoString() string { return s.String() } +// Contains the output of DescribeMovingAddresses. type DescribeMovingAddressesOutput struct { _ struct{} `type:"structure"` @@ -12819,6 +14116,7 @@ func (s DescribeMovingAddressesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeNatGateways. type DescribeNatGatewaysInput struct { _ struct{} `type:"structure"` @@ -12859,6 +14157,7 @@ func (s DescribeNatGatewaysInput) GoString() string { return s.String() } +// Contains the output of DescribeNatGateways. type DescribeNatGatewaysOutput struct { _ struct{} `type:"structure"` @@ -12880,6 +14179,7 @@ func (s DescribeNatGatewaysOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeNetworkAcls. type DescribeNetworkAclsInput struct { _ struct{} `type:"structure"` @@ -12954,6 +14254,7 @@ func (s DescribeNetworkAclsInput) GoString() string { return s.String() } +// Contains the output of DescribeNetworkAcls. type DescribeNetworkAclsOutput struct { _ struct{} `type:"structure"` @@ -12971,6 +14272,7 @@ func (s DescribeNetworkAclsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeNetworkInterfaceAttribute. type DescribeNetworkInterfaceAttributeInput struct { _ struct{} `type:"structure"` @@ -12997,6 +14299,20 @@ func (s DescribeNetworkInterfaceAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNetworkInterfaceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNetworkInterfaceAttributeInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DescribeNetworkInterfaceAttribute. type DescribeNetworkInterfaceAttributeOutput struct { _ struct{} `type:"structure"` @@ -13026,6 +14342,7 @@ func (s DescribeNetworkInterfaceAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeNetworkInterfaces. type DescribeNetworkInterfacesInput struct { _ struct{} `type:"structure"` @@ -13155,6 +14472,7 @@ func (s DescribeNetworkInterfacesInput) GoString() string { return s.String() } +// Contains the output of DescribeNetworkInterfaces. type DescribeNetworkInterfacesOutput struct { _ struct{} `type:"structure"` @@ -13172,6 +14490,7 @@ func (s DescribeNetworkInterfacesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribePlacementGroups. type DescribePlacementGroupsInput struct { _ struct{} `type:"structure"` @@ -13207,6 +14526,7 @@ func (s DescribePlacementGroupsInput) GoString() string { return s.String() } +// Contains the output of DescribePlacementGroups. type DescribePlacementGroupsOutput struct { _ struct{} `type:"structure"` @@ -13224,6 +14544,7 @@ func (s DescribePlacementGroupsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribePrefixLists. type DescribePrefixListsInput struct { _ struct{} `type:"structure"` @@ -13266,6 +14587,7 @@ func (s DescribePrefixListsInput) GoString() string { return s.String() } +// Contains the output of DescribePrefixLists. type DescribePrefixListsOutput struct { _ struct{} `type:"structure"` @@ -13287,6 +14609,7 @@ func (s DescribePrefixListsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeRegions. type DescribeRegionsInput struct { _ struct{} `type:"structure"` @@ -13317,6 +14640,7 @@ func (s DescribeRegionsInput) GoString() string { return s.String() } +// Contains the output of DescribeRegions. type DescribeRegionsOutput struct { _ struct{} `type:"structure"` @@ -13334,6 +14658,7 @@ func (s DescribeRegionsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeReservedInstances. type DescribeReservedInstancesInput struct { _ struct{} `type:"structure"` @@ -13414,6 +14739,7 @@ func (s DescribeReservedInstancesInput) GoString() string { return s.String() } +// Contains the parameters for DescribeReservedInstancesListings. type DescribeReservedInstancesListingsInput struct { _ struct{} `type:"structure"` @@ -13446,6 +14772,7 @@ func (s DescribeReservedInstancesListingsInput) GoString() string { return s.String() } +// Contains the output of DescribeReservedInstancesListings. type DescribeReservedInstancesListingsOutput struct { _ struct{} `type:"structure"` @@ -13463,6 +14790,7 @@ func (s DescribeReservedInstancesListingsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeReservedInstancesModifications. type DescribeReservedInstancesModificationsInput struct { _ struct{} `type:"structure"` @@ -13519,6 +14847,7 @@ func (s DescribeReservedInstancesModificationsInput) GoString() string { return s.String() } +// Contains the output of DescribeReservedInstancesModifications. type DescribeReservedInstancesModificationsOutput struct { _ struct{} `type:"structure"` @@ -13540,6 +14869,7 @@ func (s DescribeReservedInstancesModificationsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeReservedInstancesOfferings. type DescribeReservedInstancesOfferingsInput struct { _ struct{} `type:"structure"` @@ -13648,6 +14978,7 @@ func (s DescribeReservedInstancesOfferingsInput) GoString() string { return s.String() } +// Contains the output of DescribeReservedInstancesOfferings. type DescribeReservedInstancesOfferingsOutput struct { _ struct{} `type:"structure"` @@ -13669,6 +15000,7 @@ func (s DescribeReservedInstancesOfferingsOutput) GoString() string { return s.String() } +// Contains the output for DescribeReservedInstances. type DescribeReservedInstancesOutput struct { _ struct{} `type:"structure"` @@ -13686,6 +15018,7 @@ func (s DescribeReservedInstancesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeRouteTables. type DescribeRouteTablesInput struct { _ struct{} `type:"structure"` @@ -13768,6 +15101,7 @@ func (s DescribeRouteTablesInput) GoString() string { return s.String() } +// Contains the output of DescribeRouteTables. type DescribeRouteTablesOutput struct { _ struct{} `type:"structure"` @@ -13841,6 +15175,27 @@ func (s DescribeScheduledInstanceAvailabilityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScheduledInstanceAvailabilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledInstanceAvailabilityInput"} + if s.FirstSlotStartTimeRange == nil { + invalidParams.Add(request.NewErrParamRequired("FirstSlotStartTimeRange")) + } + if s.Recurrence == nil { + invalidParams.Add(request.NewErrParamRequired("Recurrence")) + } + if s.FirstSlotStartTimeRange != nil { + if err := s.FirstSlotStartTimeRange.Validate(); err != nil { + invalidParams.AddNested("FirstSlotStartTimeRange", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of DescribeScheduledInstanceAvailability. type DescribeScheduledInstanceAvailabilityOutput struct { _ struct{} `type:"structure"` @@ -13931,6 +15286,7 @@ func (s DescribeScheduledInstancesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeSecurityGroups. type DescribeSecurityGroupsInput struct { _ struct{} `type:"structure"` @@ -14007,6 +15363,7 @@ func (s DescribeSecurityGroupsInput) GoString() string { return s.String() } +// Contains the output of DescribeSecurityGroups. type DescribeSecurityGroupsOutput struct { _ struct{} `type:"structure"` @@ -14024,6 +15381,7 @@ func (s DescribeSecurityGroupsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeSnapshotAttribute. type DescribeSnapshotAttributeInput struct { _ struct{} `type:"structure"` @@ -14050,6 +15408,23 @@ func (s DescribeSnapshotAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSnapshotAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DescribeSnapshotAttribute. type DescribeSnapshotAttributeOutput struct { _ struct{} `type:"structure"` @@ -14073,6 +15448,7 @@ func (s DescribeSnapshotAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeSnapshots. type DescribeSnapshotsInput struct { _ struct{} `type:"structure"` @@ -14158,6 +15534,7 @@ func (s DescribeSnapshotsInput) GoString() string { return s.String() } +// Contains the output of DescribeSnapshots. type DescribeSnapshotsOutput struct { _ struct{} `type:"structure"` @@ -14252,6 +15629,19 @@ func (s DescribeSpotFleetInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSpotFleetInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetInstancesInput"} + if s.SpotFleetRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of DescribeSpotFleetInstances. type DescribeSpotFleetInstancesOutput struct { _ struct{} `type:"structure"` @@ -14316,6 +15706,22 @@ func (s DescribeSpotFleetRequestHistoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSpotFleetRequestHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetRequestHistoryInput"} + if s.SpotFleetRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of DescribeSpotFleetRequestHistory. type DescribeSpotFleetRequestHistoryOutput struct { _ struct{} `type:"structure"` @@ -14440,8 +15846,9 @@ type DescribeSpotInstanceRequestsInput struct { // launch.block-device-mapping.volume-size - The size of the Amazon EBS volume, // in GiB. // - // launch.block-device-mapping.volume-type - The type of the Amazon EBS volume - // (gp2 | standard | io1). + // launch.block-device-mapping.volume-type - The type of the Amazon EBS volume: + // gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput + // Optimized HDD, sc1for Cold HDD, or standard for Magnetic. // // launch.group-id - The security group for the instance. // @@ -14642,6 +16049,7 @@ func (s DescribeSpotPriceHistoryOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeSubnets. type DescribeSubnetsInput struct { _ struct{} `type:"structure"` @@ -14701,6 +16109,7 @@ func (s DescribeSubnetsInput) GoString() string { return s.String() } +// Contains the output of DescribeSubnets. type DescribeSubnetsOutput struct { _ struct{} `type:"structure"` @@ -14718,6 +16127,7 @@ func (s DescribeSubnetsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeTags. type DescribeTagsInput struct { _ struct{} `type:"structure"` @@ -14741,11 +16151,9 @@ type DescribeTagsInput struct { // value - The tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. + // The maximum number of results to return in a single call. This value can + // be between 5 and 1000. To retrieve the remaining results, make another call + // with the returned NextToken value. MaxResults *int64 `locationName:"maxResults" type:"integer"` // The token to retrieve the next page of results. @@ -14762,6 +16170,7 @@ func (s DescribeTagsInput) GoString() string { return s.String() } +// Contains the output of DescribeTags. type DescribeTagsOutput struct { _ struct{} `type:"structure"` @@ -14783,6 +16192,7 @@ func (s DescribeTagsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVolumeAttribute. type DescribeVolumeAttributeInput struct { _ struct{} `type:"structure"` @@ -14809,6 +16219,20 @@ func (s DescribeVolumeAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVolumeAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVolumeAttributeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DescribeVolumeAttribute. type DescribeVolumeAttributeOutput struct { _ struct{} `type:"structure"` @@ -14832,6 +16256,7 @@ func (s DescribeVolumeAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVolumeStatus. type DescribeVolumeStatusInput struct { _ struct{} `type:"structure"` @@ -14906,6 +16331,7 @@ func (s DescribeVolumeStatusInput) GoString() string { return s.String() } +// Contains the output of DescribeVolumeStatus. type DescribeVolumeStatusOutput struct { _ struct{} `type:"structure"` @@ -14927,6 +16353,7 @@ func (s DescribeVolumeStatusOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVolumes. type DescribeVolumesInput struct { _ struct{} `type:"structure"` @@ -14980,8 +16407,8 @@ type DescribeVolumesInput struct { // volume-id - The volume ID. // // volume-type - The Amazon EBS volume type. This can be gp2 for General - // Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard - // for Magnetic volumes. + // Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, + // sc1 for Cold HDD, or standard for Magnetic volumes. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The maximum number of volume results returned by DescribeVolumes in paginated @@ -15015,6 +16442,7 @@ func (s DescribeVolumesInput) GoString() string { return s.String() } +// Contains the output of DescribeVolumes. type DescribeVolumesOutput struct { _ struct{} `type:"structure"` @@ -15038,6 +16466,7 @@ func (s DescribeVolumesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpcAttribute. type DescribeVpcAttributeInput struct { _ struct{} `type:"structure"` @@ -15064,6 +16493,23 @@ func (s DescribeVpcAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVpcAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVpcAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DescribeVpcAttribute. type DescribeVpcAttributeOutput struct { _ struct{} `type:"structure"` @@ -15091,6 +16537,7 @@ func (s DescribeVpcAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpcClassicLinkDnsSupport. type DescribeVpcClassicLinkDnsSupportInput struct { _ struct{} `type:"structure"` @@ -15117,6 +16564,23 @@ func (s DescribeVpcClassicLinkDnsSupportInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVpcClassicLinkDnsSupportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVpcClassicLinkDnsSupportInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DescribeVpcClassicLinkDnsSupport. type DescribeVpcClassicLinkDnsSupportOutput struct { _ struct{} `type:"structure"` @@ -15137,6 +16601,7 @@ func (s DescribeVpcClassicLinkDnsSupportOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpcClassicLink. type DescribeVpcClassicLinkInput struct { _ struct{} `type:"structure"` @@ -15178,6 +16643,7 @@ func (s DescribeVpcClassicLinkInput) GoString() string { return s.String() } +// Contains the output of DescribeVpcClassicLink. type DescribeVpcClassicLinkOutput struct { _ struct{} `type:"structure"` @@ -15195,6 +16661,7 @@ func (s DescribeVpcClassicLinkOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpcEndpointServices. type DescribeVpcEndpointServicesInput struct { _ struct{} `type:"structure"` @@ -15226,6 +16693,7 @@ func (s DescribeVpcEndpointServicesInput) GoString() string { return s.String() } +// Contains the output of DescribeVpcEndpointServices. type DescribeVpcEndpointServicesOutput struct { _ struct{} `type:"structure"` @@ -15247,6 +16715,7 @@ func (s DescribeVpcEndpointServicesOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpcEndpoints. type DescribeVpcEndpointsInput struct { _ struct{} `type:"structure"` @@ -15293,6 +16762,7 @@ func (s DescribeVpcEndpointsInput) GoString() string { return s.String() } +// Contains the output of DescribeVpcEndpoints. type DescribeVpcEndpointsOutput struct { _ struct{} `type:"structure"` @@ -15314,6 +16784,7 @@ func (s DescribeVpcEndpointsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpcPeeringConnections. type DescribeVpcPeeringConnectionsInput struct { _ struct{} `type:"structure"` @@ -15378,6 +16849,7 @@ func (s DescribeVpcPeeringConnectionsInput) GoString() string { return s.String() } +// Contains the output of DescribeVpcPeeringConnections. type DescribeVpcPeeringConnectionsOutput struct { _ struct{} `type:"structure"` @@ -15395,6 +16867,7 @@ func (s DescribeVpcPeeringConnectionsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpcs. type DescribeVpcsInput struct { _ struct{} `type:"structure"` @@ -15447,6 +16920,7 @@ func (s DescribeVpcsInput) GoString() string { return s.String() } +// Contains the output of DescribeVpcs. type DescribeVpcsOutput struct { _ struct{} `type:"structure"` @@ -15464,6 +16938,7 @@ func (s DescribeVpcsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpnConnections. type DescribeVpnConnectionsInput struct { _ struct{} `type:"structure"` @@ -15531,6 +17006,7 @@ func (s DescribeVpnConnectionsInput) GoString() string { return s.String() } +// Contains the output of DescribeVpnConnections. type DescribeVpnConnectionsOutput struct { _ struct{} `type:"structure"` @@ -15548,6 +17024,7 @@ func (s DescribeVpnConnectionsOutput) GoString() string { return s.String() } +// Contains the parameters for DescribeVpnGateways. type DescribeVpnGatewaysInput struct { _ struct{} `type:"structure"` @@ -15604,6 +17081,7 @@ func (s DescribeVpnGatewaysInput) GoString() string { return s.String() } +// Contains the output of DescribeVpnGateways. type DescribeVpnGatewaysOutput struct { _ struct{} `type:"structure"` @@ -15621,6 +17099,7 @@ func (s DescribeVpnGatewaysOutput) GoString() string { return s.String() } +// Contains the parameters for DetachClassicLinkVpc. type DetachClassicLinkVpcInput struct { _ struct{} `type:"structure"` @@ -15647,6 +17126,23 @@ func (s DetachClassicLinkVpcInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachClassicLinkVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachClassicLinkVpcInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DetachClassicLinkVpc. type DetachClassicLinkVpcOutput struct { _ struct{} `type:"structure"` @@ -15664,6 +17160,7 @@ func (s DetachClassicLinkVpcOutput) GoString() string { return s.String() } +// Contains the parameters for DetachInternetGateway. type DetachInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -15690,6 +17187,22 @@ func (s DetachInternetGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachInternetGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachInternetGatewayInput"} + if s.InternetGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachInternetGatewayOutput struct { _ struct{} `type:"structure"` } @@ -15704,6 +17217,7 @@ func (s DetachInternetGatewayOutput) GoString() string { return s.String() } +// Contains the parameters for DetachNetworkInterface. type DetachNetworkInterfaceInput struct { _ struct{} `type:"structure"` @@ -15730,6 +17244,19 @@ func (s DetachNetworkInterfaceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachNetworkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachNetworkInterfaceInput"} + if s.AttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("AttachmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachNetworkInterfaceOutput struct { _ struct{} `type:"structure"` } @@ -15744,6 +17271,7 @@ func (s DetachNetworkInterfaceOutput) GoString() string { return s.String() } +// Contains the parameters for DetachVolume. type DetachVolumeInput struct { _ struct{} `type:"structure"` @@ -15782,6 +17310,20 @@ func (s DetachVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the parameters for DetachVpnGateway. type DetachVpnGatewayInput struct { _ struct{} `type:"structure"` @@ -15808,6 +17350,22 @@ func (s DetachVpnGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachVpnGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachVpnGatewayInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + if s.VpnGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachVpnGatewayOutput struct { _ struct{} `type:"structure"` } @@ -15867,6 +17425,7 @@ func (s DhcpOptions) GoString() string { return s.String() } +// Contains the parameters for DisableVgwRoutePropagation. type DisableVgwRoutePropagationInput struct { _ struct{} `type:"structure"` @@ -15887,6 +17446,22 @@ func (s DisableVgwRoutePropagationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableVgwRoutePropagationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableVgwRoutePropagationInput"} + if s.GatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayId")) + } + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableVgwRoutePropagationOutput struct { _ struct{} `type:"structure"` } @@ -15901,6 +17476,7 @@ func (s DisableVgwRoutePropagationOutput) GoString() string { return s.String() } +// Contains the parameters for DisableVpcClassicLinkDnsSupport. type DisableVpcClassicLinkDnsSupportInput struct { _ struct{} `type:"structure"` @@ -15918,6 +17494,7 @@ func (s DisableVpcClassicLinkDnsSupportInput) GoString() string { return s.String() } +// Contains the output of DisableVpcClassicLinkDnsSupport. type DisableVpcClassicLinkDnsSupportOutput struct { _ struct{} `type:"structure"` @@ -15935,6 +17512,7 @@ func (s DisableVpcClassicLinkDnsSupportOutput) GoString() string { return s.String() } +// Contains the parameters for DisableVpcClassicLink. type DisableVpcClassicLinkInput struct { _ struct{} `type:"structure"` @@ -15958,6 +17536,20 @@ func (s DisableVpcClassicLinkInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableVpcClassicLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableVpcClassicLinkInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of DisableVpcClassicLink. type DisableVpcClassicLinkOutput struct { _ struct{} `type:"structure"` @@ -15975,6 +17567,7 @@ func (s DisableVpcClassicLinkOutput) GoString() string { return s.String() } +// Contains the parameters for DisassociateAddress. type DisassociateAddressInput struct { _ struct{} `type:"structure"` @@ -16015,6 +17608,7 @@ func (s DisassociateAddressOutput) GoString() string { return s.String() } +// Contains the parameters for DisassociateRouteTable. type DisassociateRouteTableInput struct { _ struct{} `type:"structure"` @@ -16039,6 +17633,19 @@ func (s DisassociateRouteTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateRouteTableInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisassociateRouteTableOutput struct { _ struct{} `type:"structure"` } @@ -16077,6 +17684,26 @@ func (s DiskImage) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DiskImage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DiskImage"} + if s.Image != nil { + if err := s.Image.Validate(); err != nil { + invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) + } + } + if s.Volume != nil { + if err := s.Volume.Validate(); err != nil { + invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a disk image. type DiskImageDescription struct { _ struct{} `type:"structure"` @@ -16142,6 +17769,25 @@ func (s DiskImageDetail) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DiskImageDetail) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DiskImageDetail"} + if s.Bytes == nil { + invalidParams.Add(request.NewErrParamRequired("Bytes")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.ImportManifestUrl == nil { + invalidParams.Add(request.NewErrParamRequired("ImportManifestUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a disk image volume. type DiskImageVolumeDescription struct { _ struct{} `type:"structure"` @@ -16175,18 +17821,18 @@ type EbsBlockDevice struct { Encrypted *bool `locationName:"encrypted" type:"boolean"` // The number of I/O operations per second (IOPS) that the volume supports. - // For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that - // are provisioned for the volume. For General Purpose (SSD) volumes, this represents - // the baseline performance of the volume and the rate at which the volume accumulates - // I/O credits for bursting. For more information on General Purpose (SSD) baseline - // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // 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 on General Purpose SSD baseline performance, I/O credits, and + // bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and - // 3 to 10000 for General Purpose (SSD) volumes. + // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for + // gp2 volumes. // // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create standard or gp2 volumes. + // it is not used in requests to create gp2, st1, sc1, or standard volumes. Iops *int64 `locationName:"iops" type:"integer"` // The ID of the snapshot. @@ -16194,16 +17840,17 @@ type EbsBlockDevice struct { // The size of the volume, in GiB. // - // Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 - // for io1 volumes. If you specify a snapshot, the volume size must be equal - // to or larger than the snapshot size. + // Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned + // IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for + // Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify + // a snapshot, the volume size must be equal to or larger than the snapshot + // size. // // Default: If you're creating the volume from a snapshot and don't specify // a volume size, the default is the snapshot size. VolumeSize *int64 `locationName:"volumeSize" type:"integer"` - // The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned - // IOPS (SSD) volumes, and standard for Magnetic volumes. + // The volume type: gp2, io1, st1, sc1, or standard. // // Default: standard VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` @@ -16246,6 +17893,8 @@ func (s EbsInstanceBlockDevice) GoString() string { return s.String() } +// Describes information used to set up an EBS volume specified in a block device +// mapping. type EbsInstanceBlockDeviceSpecification struct { _ struct{} `type:"structure"` @@ -16266,6 +17915,7 @@ func (s EbsInstanceBlockDeviceSpecification) GoString() string { return s.String() } +// Contains the parameters for EnableVgwRoutePropagation. type EnableVgwRoutePropagationInput struct { _ struct{} `type:"structure"` @@ -16286,6 +17936,22 @@ func (s EnableVgwRoutePropagationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableVgwRoutePropagationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableVgwRoutePropagationInput"} + if s.GatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayId")) + } + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableVgwRoutePropagationOutput struct { _ struct{} `type:"structure"` } @@ -16300,6 +17966,7 @@ func (s EnableVgwRoutePropagationOutput) GoString() string { return s.String() } +// Contains the parameters for EnableVolumeIO. type EnableVolumeIOInput struct { _ struct{} `type:"structure"` @@ -16323,6 +17990,19 @@ func (s EnableVolumeIOInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableVolumeIOInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableVolumeIOInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableVolumeIOOutput struct { _ struct{} `type:"structure"` } @@ -16337,6 +18017,7 @@ func (s EnableVolumeIOOutput) GoString() string { return s.String() } +// Contains the parameters for EnableVpcClassicLinkDnsSupport. type EnableVpcClassicLinkDnsSupportInput struct { _ struct{} `type:"structure"` @@ -16354,6 +18035,7 @@ func (s EnableVpcClassicLinkDnsSupportInput) GoString() string { return s.String() } +// Contains the output of EnableVpcClassicLinkDnsSupport. type EnableVpcClassicLinkDnsSupportOutput struct { _ struct{} `type:"structure"` @@ -16371,6 +18053,7 @@ func (s EnableVpcClassicLinkDnsSupportOutput) GoString() string { return s.String() } +// Contains the parameters for EnableVpcClassicLink. type EnableVpcClassicLinkInput struct { _ struct{} `type:"structure"` @@ -16394,6 +18077,20 @@ func (s EnableVpcClassicLinkInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableVpcClassicLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableVpcClassicLinkInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of EnableVpcClassicLink. type EnableVpcClassicLinkOutput struct { _ struct{} `type:"structure"` @@ -16649,6 +18346,7 @@ func (s FlowLog) GoString() string { return s.String() } +// Contains the parameters for GetConsoleOutput. type GetConsoleOutputInput struct { _ struct{} `type:"structure"` @@ -16672,6 +18370,20 @@ func (s GetConsoleOutputInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetConsoleOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConsoleOutputInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of GetConsoleOutput. type GetConsoleOutputOutput struct { _ struct{} `type:"structure"` @@ -16696,6 +18408,7 @@ func (s GetConsoleOutputOutput) GoString() string { return s.String() } +// Contains the parameters for GetPasswordData. type GetPasswordDataInput struct { _ struct{} `type:"structure"` @@ -16719,6 +18432,20 @@ func (s GetPasswordDataInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPasswordDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPasswordDataInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of GetPasswordData. type GetPasswordDataOutput struct { _ struct{} `type:"structure"` @@ -16839,13 +18566,14 @@ func (s Host) GoString() string { return s.String() } +// Describes an instance running on a Dedicated host. type HostInstance struct { _ struct{} `type:"structure"` // the IDs of instances that are running on the Dedicated host. InstanceId *string `locationName:"instanceId" type:"string"` - // The instance type size (e.g., m3.medium) of the running instance. + // The instance type size (for example, m3.medium) of the running instance. InstanceType *string `locationName:"instanceType" type:"string"` } @@ -16859,13 +18587,14 @@ func (s HostInstance) GoString() string { return s.String() } +// Describes properties of a Dedicated host. type HostProperties struct { _ struct{} `type:"structure"` // The number of cores on the Dedicated host. Cores *int64 `locationName:"cores" type:"integer"` - // The instance type size that the Dedicated host supports (e.g., m3.medium). + // The instance type size that the Dedicated host supports (for example, m3.medium). InstanceType *string `locationName:"instanceType" type:"string"` // The number of sockets on the Dedicated host. @@ -17101,6 +18830,7 @@ func (s ImageDiskContainer) GoString() string { return s.String() } +// Contains the parameters for ImportImage. type ImportImageInput struct { _ struct{} `type:"structure"` @@ -17161,6 +18891,7 @@ func (s ImportImageInput) GoString() string { return s.String() } +// Contains the output for ImportImage. type ImportImageOutput struct { _ struct{} `type:"structure"` @@ -17260,6 +18991,7 @@ func (s ImportImageTask) GoString() string { return s.String() } +// Contains the parameters for ImportInstance. type ImportInstanceInput struct { _ struct{} `type:"structure"` @@ -17292,6 +19024,29 @@ func (s ImportInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportInstanceInput"} + if s.Platform == nil { + invalidParams.Add(request.NewErrParamRequired("Platform")) + } + if s.DiskImages != nil { + for i, v := range s.DiskImages { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DiskImages", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the launch specification for VM import. type ImportInstanceLaunchSpecification struct { _ struct{} `type:"structure"` @@ -17343,6 +19098,7 @@ func (s ImportInstanceLaunchSpecification) GoString() string { return s.String() } +// Contains the output for ImportInstance. type ImportInstanceOutput struct { _ struct{} `type:"structure"` @@ -17423,6 +19179,7 @@ func (s ImportInstanceVolumeDetailItem) GoString() string { return s.String() } +// Contains the parameters for ImportKeyPair. type ImportKeyPairInput struct { _ struct{} `type:"structure"` @@ -17435,8 +19192,8 @@ type ImportKeyPairInput struct { // A unique name for the key pair. KeyName *string `locationName:"keyName" type:"string" required:"true"` - // The public key. You must base64 encode the public key material before sending - // it to AWS. + // The public key. For API calls, the text must be base64-encoded. For command + // line tools, base64 encoding is performed for you. // // PublicKeyMaterial is automatically base64 encoded/decoded by the SDK. PublicKeyMaterial []byte `locationName:"publicKeyMaterial" type:"blob" required:"true"` @@ -17452,6 +19209,23 @@ func (s ImportKeyPairInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} + if s.KeyName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyName")) + } + if s.PublicKeyMaterial == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKeyMaterial")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ImportKeyPair. type ImportKeyPairOutput struct { _ struct{} `type:"structure"` @@ -17472,6 +19246,7 @@ func (s ImportKeyPairOutput) GoString() string { return s.String() } +// Contains the parameters for ImportSnapshot. type ImportSnapshotInput struct { _ struct{} `type:"structure"` @@ -17507,6 +19282,7 @@ func (s ImportSnapshotInput) GoString() string { return s.String() } +// Contains the output for ImportSnapshot. type ImportSnapshotOutput struct { _ struct{} `type:"structure"` @@ -17554,6 +19330,7 @@ func (s ImportSnapshotTask) GoString() string { return s.String() } +// Contains the parameters for ImportVolume. type ImportVolumeInput struct { _ struct{} `type:"structure"` @@ -17586,6 +19363,36 @@ func (s ImportVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportVolumeInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.Image == nil { + invalidParams.Add(request.NewErrParamRequired("Image")) + } + if s.Volume == nil { + invalidParams.Add(request.NewErrParamRequired("Volume")) + } + if s.Image != nil { + if err := s.Image.Validate(); err != nil { + invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) + } + } + if s.Volume != nil { + if err := s.Volume.Validate(); err != nil { + invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output for ImportVolume. type ImportVolumeOutput struct { _ struct{} `type:"structure"` @@ -18085,6 +19892,26 @@ func (s InstanceNetworkInterfaceSpecification) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InstanceNetworkInterfaceSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InstanceNetworkInterfaceSpecification"} + if s.PrivateIpAddresses != nil { + for i, v := range s.PrivateIpAddresses { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a private IP address. type InstancePrivateIpAddress struct { _ struct{} `type:"structure"` @@ -18120,17 +19947,17 @@ type InstanceState struct { // The low byte represents the state. The high byte is an opaque internal value // and should be ignored. // - // 0 : pending + // 0 : pending // - // 16 : running + // 16 : running // - // 32 : shutting-down + // 32 : shutting-down // - // 48 : terminated + // 48 : terminated // - // 64 : stopping + // 64 : stopping // - // 80 : stopped + // 80 : stopped Code *int64 `locationName:"code" type:"integer"` // The current state of the instance. @@ -18466,6 +20293,9 @@ type LaunchSpecification struct { AddressingType *string `locationName:"addressingType" type:"string"` // One or more block device mapping entries. + // + // Although you can specify encrypted EBS volumes in this block device mapping + // for your Spot Instances, these volumes are not encrypted. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` // Indicates whether the instance is optimized for EBS I/O. This optimization @@ -18526,6 +20356,7 @@ func (s LaunchSpecification) GoString() string { return s.String() } +// Contains the parameters for ModifyHosts. type ModifyHostsInput struct { _ struct{} `type:"structure"` @@ -18546,6 +20377,23 @@ func (s ModifyHostsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyHostsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyHostsInput"} + if s.AutoPlacement == nil { + invalidParams.Add(request.NewErrParamRequired("AutoPlacement")) + } + if s.HostIds == nil { + invalidParams.Add(request.NewErrParamRequired("HostIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ModifyHosts. type ModifyHostsOutput struct { _ struct{} `type:"structure"` @@ -18567,6 +20415,7 @@ func (s ModifyHostsOutput) GoString() string { return s.String() } +// Contains the parameters of ModifyIdFormat. type ModifyIdFormatInput struct { _ struct{} `type:"structure"` @@ -18587,6 +20436,22 @@ func (s ModifyIdFormatInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyIdFormatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyIdFormatInput"} + if s.Resource == nil { + invalidParams.Add(request.NewErrParamRequired("Resource")) + } + if s.UseLongIds == nil { + invalidParams.Add(request.NewErrParamRequired("UseLongIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyIdFormatOutput struct { _ struct{} `type:"structure"` } @@ -18601,6 +20466,7 @@ func (s ModifyIdFormatOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyImageAttribute. type ModifyImageAttributeInput struct { _ struct{} `type:"structure"` @@ -18652,6 +20518,19 @@ func (s ModifyImageAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyImageAttributeInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyImageAttributeOutput struct { _ struct{} `type:"structure"` } @@ -18666,6 +20545,7 @@ func (s ModifyImageAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyInstanceAttribute. type ModifyInstanceAttributeInput struct { _ struct{} `type:"structure"` @@ -18741,7 +20621,8 @@ type ModifyInstanceAttributeInput struct { // with a PV instance can make it unreachable. SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` - // Changes the instance's user data to the specified value. + // Changes the instance's user data to the specified base64-encoded value. For + // command line tools, base64 encoding is performed for you. UserData *BlobAttributeValue `locationName:"userData" type:"structure"` // A new value for the attribute. Use only with the kernel, ramdisk, userData, @@ -18759,6 +20640,19 @@ func (s ModifyInstanceAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyInstanceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceAttributeInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyInstanceAttributeOutput struct { _ struct{} `type:"structure"` } @@ -18773,6 +20667,7 @@ func (s ModifyInstanceAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyInstancePlacement. type ModifyInstancePlacementInput struct { _ struct{} `type:"structure"` @@ -18799,6 +20694,20 @@ func (s ModifyInstancePlacementInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyInstancePlacementInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstancePlacementInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ModifyInstancePlacement. type ModifyInstancePlacementOutput struct { _ struct{} `type:"structure"` @@ -18816,6 +20725,7 @@ func (s ModifyInstancePlacementOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyNetworkInterfaceAttribute. type ModifyNetworkInterfaceAttributeInput struct { _ struct{} `type:"structure"` @@ -18859,6 +20769,19 @@ func (s ModifyNetworkInterfaceAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyNetworkInterfaceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyNetworkInterfaceAttributeInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyNetworkInterfaceAttributeOutput struct { _ struct{} `type:"structure"` } @@ -18873,6 +20796,7 @@ func (s ModifyNetworkInterfaceAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyReservedInstances. type ModifyReservedInstancesInput struct { _ struct{} `type:"structure"` @@ -18897,6 +20821,23 @@ func (s ModifyReservedInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyReservedInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyReservedInstancesInput"} + if s.ReservedInstancesIds == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesIds")) + } + if s.TargetConfigurations == nil { + invalidParams.Add(request.NewErrParamRequired("TargetConfigurations")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ModifyReservedInstances. type ModifyReservedInstancesOutput struct { _ struct{} `type:"structure"` @@ -18914,6 +20855,7 @@ func (s ModifyReservedInstancesOutput) GoString() string { return s.String() } +// Contains the parameters for ModifySnapshotAttribute. type ModifySnapshotAttributeInput struct { _ struct{} `type:"structure"` @@ -18954,6 +20896,19 @@ func (s ModifySnapshotAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifySnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotAttributeInput"} + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifySnapshotAttributeOutput struct { _ struct{} `type:"structure"` } @@ -18994,6 +20949,19 @@ func (s ModifySpotFleetRequestInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifySpotFleetRequestInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySpotFleetRequestInput"} + if s.SpotFleetRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of ModifySpotFleetRequest. type ModifySpotFleetRequestOutput struct { _ struct{} `type:"structure"` @@ -19012,6 +20980,7 @@ func (s ModifySpotFleetRequestOutput) GoString() string { return s.String() } +// Contains the parameters for ModifySubnetAttribute. type ModifySubnetAttributeInput struct { _ struct{} `type:"structure"` @@ -19033,6 +21002,19 @@ func (s ModifySubnetAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifySubnetAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySubnetAttributeInput"} + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifySubnetAttributeOutput struct { _ struct{} `type:"structure"` } @@ -19047,6 +21029,7 @@ func (s ModifySubnetAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyVolumeAttribute. type ModifyVolumeAttributeInput struct { _ struct{} `type:"structure"` @@ -19073,6 +21056,19 @@ func (s ModifyVolumeAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVolumeAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVolumeAttributeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyVolumeAttributeOutput struct { _ struct{} `type:"structure"` } @@ -19087,6 +21083,7 @@ func (s ModifyVolumeAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyVpcAttribute. type ModifyVpcAttributeInput struct { _ struct{} `type:"structure"` @@ -19122,6 +21119,19 @@ func (s ModifyVpcAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVpcAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcAttributeInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyVpcAttributeOutput struct { _ struct{} `type:"structure"` } @@ -19136,6 +21146,7 @@ func (s ModifyVpcAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ModifyVpcEndpoint. type ModifyVpcEndpointInput struct { _ struct{} `type:"structure"` @@ -19173,6 +21184,20 @@ func (s ModifyVpcEndpointInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVpcEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointInput"} + if s.VpcEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ModifyVpcEndpoint. type ModifyVpcEndpointOutput struct { _ struct{} `type:"structure"` @@ -19190,6 +21215,79 @@ func (s ModifyVpcEndpointOutput) GoString() string { return s.String() } +type ModifyVpcPeeringConnectionOptionsInput struct { + _ struct{} `type:"structure"` + + // The VPC peering connection options for the accepter VPC. + AccepterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` + + // Checks whether you have the required permissions for the operation, 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. + DryRun *bool `type:"boolean"` + + // The VPC peering connection options for the requester VPC. + RequesterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` + + // The ID of the VPC peering connection. + VpcPeeringConnectionId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyVpcPeeringConnectionOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcPeeringConnectionOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVpcPeeringConnectionOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcPeeringConnectionOptionsInput"} + if s.VpcPeeringConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) + } + if s.AccepterPeeringConnectionOptions != nil { + if err := s.AccepterPeeringConnectionOptions.Validate(); err != nil { + invalidParams.AddNested("AccepterPeeringConnectionOptions", err.(request.ErrInvalidParams)) + } + } + if s.RequesterPeeringConnectionOptions != nil { + if err := s.RequesterPeeringConnectionOptions.Validate(); err != nil { + invalidParams.AddNested("RequesterPeeringConnectionOptions", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +type ModifyVpcPeeringConnectionOptionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the VPC peering connection options for the accepter VPC. + AccepterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"accepterPeeringConnectionOptions" type:"structure"` + + // Information about the VPC peering connection options for the requester VPC. + RequesterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"requesterPeeringConnectionOptions" type:"structure"` +} + +// String returns the string representation +func (s ModifyVpcPeeringConnectionOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcPeeringConnectionOptionsOutput) GoString() string { + return s.String() +} + +// Contains the parameters for MonitorInstances. type MonitorInstancesInput struct { _ struct{} `type:"structure"` @@ -19213,6 +21311,20 @@ func (s MonitorInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *MonitorInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MonitorInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of MonitorInstances. type MonitorInstancesOutput struct { _ struct{} `type:"structure"` @@ -19248,6 +21360,7 @@ func (s Monitoring) GoString() string { return s.String() } +// Contains the parameters for MoveAddressToVpc. type MoveAddressToVpcInput struct { _ struct{} `type:"structure"` @@ -19271,6 +21384,20 @@ func (s MoveAddressToVpcInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *MoveAddressToVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MoveAddressToVpcInput"} + if s.PublicIp == nil { + invalidParams.Add(request.NewErrParamRequired("PublicIp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of MoveAddressToVpc. type MoveAddressToVpcOutput struct { _ struct{} `type:"structure"` @@ -19331,15 +21458,22 @@ type NatGateway struct { // If the NAT gateway could not be created, specifies the error message for // the failure, that corresponds to the error code. // - // For InsufficientFreeAddressesInSubnet: Subnet has insufficient free addresses - // to create this NAT gateway For Gateway.NotAttached: Network vpc-xxxxxxxx - // has no Internet gateway attached For InvalidAllocationID.NotFound: Elastic - // IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway - // For Resource.AlreadyAssociated: Elastic IP address eipalloc-xxxxxxxx is already - // associated For InternalError: Network interface eni-xxxxxxxx, created and - // used internally by this NAT gateway is in an invalid state. Please try again. - // For InvalidSubnetID.NotFound: The specified subnet subnet-xxxxxxxx does not - // exist or could not be found. + // For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses + // to create this NAT gateway" + // + // For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached" + // + // For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx + // could not be associated with this NAT gateway" + // + // For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is + // already associated" + // + // For InternalError: "Network interface eni-xxxxxxxx, created and used internally + // by this NAT gateway is in an invalid state. Please try again." + // + // For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does + // not exist or could not be found." FailureMessage *string `locationName:"failureMessage" type:"string"` // Information about the IP addresses and network interface associated with @@ -19700,6 +21834,68 @@ func (s NewDhcpConfiguration) GoString() string { return s.String() } +// Describes the VPC peering connection options. +type PeeringConnectionOptions struct { + _ struct{} `type:"structure"` + + // If true, enables outbound communication from an EC2-Classic instance that's + // linked to a local VPC via ClassicLink to instances in a peer VPC. + AllowEgressFromLocalClassicLinkToRemoteVpc *bool `locationName:"allowEgressFromLocalClassicLinkToRemoteVpc" type:"boolean"` + + // If true, enables outbound communication from instances in a local VPC to + // an EC2-Classic instance that's linked to a peer VPC via ClassicLink. + AllowEgressFromLocalVpcToRemoteClassicLink *bool `locationName:"allowEgressFromLocalVpcToRemoteClassicLink" type:"boolean"` +} + +// String returns the string representation +func (s PeeringConnectionOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PeeringConnectionOptions) GoString() string { + return s.String() +} + +// The VPC peering connection options. +type PeeringConnectionOptionsRequest struct { + _ struct{} `type:"structure"` + + // If true, enables outbound communication from an EC2-Classic instance that's + // linked to a local VPC via ClassicLink to instances in a peer VPC. + AllowEgressFromLocalClassicLinkToRemoteVpc *bool `type:"boolean" required:"true"` + + // If true, enables outbound communication from instances in a local VPC to + // an EC2-Classic instance that's linked to a peer VPC via ClassicLink. + AllowEgressFromLocalVpcToRemoteClassicLink *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s PeeringConnectionOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PeeringConnectionOptionsRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PeeringConnectionOptionsRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PeeringConnectionOptionsRequest"} + if s.AllowEgressFromLocalClassicLinkToRemoteVpc == nil { + invalidParams.Add(request.NewErrParamRequired("AllowEgressFromLocalClassicLinkToRemoteVpc")) + } + if s.AllowEgressFromLocalVpcToRemoteClassicLink == nil { + invalidParams.Add(request.NewErrParamRequired("AllowEgressFromLocalVpcToRemoteClassicLink")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the placement for the instance. type Placement struct { _ struct{} `type:"structure"` @@ -19928,6 +22124,19 @@ func (s PrivateIpAddressSpecification) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PrivateIpAddressSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PrivateIpAddressSpecification"} + if s.PrivateIpAddress == nil { + invalidParams.Add(request.NewErrParamRequired("PrivateIpAddress")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a product code. type ProductCode struct { _ struct{} `type:"structure"` @@ -19988,6 +22197,23 @@ func (s PurchaseRequest) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseRequest"} + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.PurchaseToken == nil { + invalidParams.Add(request.NewErrParamRequired("PurchaseToken")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the parameters for PurchaseReservedInstancesOffering. type PurchaseReservedInstancesOfferingInput struct { _ struct{} `type:"structure"` @@ -20019,6 +22245,23 @@ func (s PurchaseReservedInstancesOfferingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseReservedInstancesOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedInstancesOfferingInput"} + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.ReservedInstancesOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of PurchaseReservedInstancesOffering. type PurchaseReservedInstancesOfferingOutput struct { _ struct{} `type:"structure"` @@ -20064,6 +22307,32 @@ func (s PurchaseScheduledInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseScheduledInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseScheduledInstancesInput"} + if s.PurchaseRequests == nil { + invalidParams.Add(request.NewErrParamRequired("PurchaseRequests")) + } + if s.PurchaseRequests != nil && len(s.PurchaseRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PurchaseRequests", 1)) + } + if s.PurchaseRequests != nil { + for i, v := range s.PurchaseRequests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PurchaseRequests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of PurchaseScheduledInstances. type PurchaseScheduledInstancesOutput struct { _ struct{} `type:"structure"` @@ -20082,6 +22351,7 @@ func (s PurchaseScheduledInstancesOutput) GoString() string { return s.String() } +// Contains the parameters for RebootInstances. type RebootInstancesInput struct { _ struct{} `type:"structure"` @@ -20105,6 +22375,19 @@ func (s RebootInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RebootInstancesOutput struct { _ struct{} `type:"structure"` } @@ -20161,6 +22444,7 @@ func (s Region) GoString() string { return s.String() } +// Contains the parameters for RegisterImage. type RegisterImageInput struct { _ struct{} `type:"structure"` @@ -20226,6 +22510,20 @@ func (s RegisterImageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterImageInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of RegisterImage. type RegisterImageOutput struct { _ struct{} `type:"structure"` @@ -20243,6 +22541,7 @@ func (s RegisterImageOutput) GoString() string { return s.String() } +// Contains the parameters for RejectVpcPeeringConnection. type RejectVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -20266,6 +22565,20 @@ func (s RejectVpcPeeringConnectionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectVpcPeeringConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectVpcPeeringConnectionInput"} + if s.VpcPeeringConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of RejectVpcPeeringConnection. type RejectVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -20283,6 +22596,7 @@ func (s RejectVpcPeeringConnectionOutput) GoString() string { return s.String() } +// Contains the parameters for ReleaseAddress. type ReleaseAddressInput struct { _ struct{} `type:"structure"` @@ -20323,6 +22637,7 @@ func (s ReleaseAddressOutput) GoString() string { return s.String() } +// Contains the parameters for ReleaseHosts. type ReleaseHostsInput struct { _ struct{} `type:"structure"` @@ -20340,6 +22655,20 @@ func (s ReleaseHostsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReleaseHostsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReleaseHostsInput"} + if s.HostIds == nil { + invalidParams.Add(request.NewErrParamRequired("HostIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ReleaseHosts. type ReleaseHostsOutput struct { _ struct{} `type:"structure"` @@ -20361,6 +22690,7 @@ func (s ReleaseHostsOutput) GoString() string { return s.String() } +// Contains the parameters for ReplaceNetworkAclAssociation. type ReplaceNetworkAclAssociationInput struct { _ struct{} `type:"structure"` @@ -20388,6 +22718,23 @@ func (s ReplaceNetworkAclAssociationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplaceNetworkAclAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclAssociationInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ReplaceNetworkAclAssociation. type ReplaceNetworkAclAssociationOutput struct { _ struct{} `type:"structure"` @@ -20405,6 +22752,7 @@ func (s ReplaceNetworkAclAssociationOutput) GoString() string { return s.String() } +// Contains the parameters for ReplaceNetworkAclEntry. type ReplaceNetworkAclEntryInput struct { _ struct{} `type:"structure"` @@ -20453,6 +22801,34 @@ func (s ReplaceNetworkAclEntryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplaceNetworkAclEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclEntryInput"} + if s.CidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("CidrBlock")) + } + if s.Egress == nil { + invalidParams.Add(request.NewErrParamRequired("Egress")) + } + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.RuleAction == nil { + invalidParams.Add(request.NewErrParamRequired("RuleAction")) + } + if s.RuleNumber == nil { + invalidParams.Add(request.NewErrParamRequired("RuleNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ReplaceNetworkAclEntryOutput struct { _ struct{} `type:"structure"` } @@ -20467,6 +22843,7 @@ func (s ReplaceNetworkAclEntryOutput) GoString() string { return s.String() } +// Contains the parameters for ReplaceRoute. type ReplaceRouteInput struct { _ struct{} `type:"structure"` @@ -20509,6 +22886,22 @@ func (s ReplaceRouteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplaceRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ReplaceRouteOutput struct { _ struct{} `type:"structure"` } @@ -20523,6 +22916,7 @@ func (s ReplaceRouteOutput) GoString() string { return s.String() } +// Contains the parameters for ReplaceRouteTableAssociation. type ReplaceRouteTableAssociationInput struct { _ struct{} `type:"structure"` @@ -20549,6 +22943,23 @@ func (s ReplaceRouteTableAssociationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplaceRouteTableAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteTableAssociationInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of ReplaceRouteTableAssociation. type ReplaceRouteTableAssociationOutput struct { _ struct{} `type:"structure"` @@ -20566,6 +22977,7 @@ func (s ReplaceRouteTableAssociationOutput) GoString() string { return s.String() } +// Contains the parameters for ReportInstanceStatus. type ReportInstanceStatusInput struct { _ struct{} `type:"structure"` @@ -20586,26 +22998,26 @@ type ReportInstanceStatusInput struct { // One or more reason codes that describes the health state of your instance. // - // instance-stuck-in-state: My instance is stuck in a state. + // instance-stuck-in-state: My instance is stuck in a state. // - // unresponsive: My instance is unresponsive. + // unresponsive: My instance is unresponsive. // - // not-accepting-credentials: My instance is not accepting my credentials. + // not-accepting-credentials: My instance is not accepting my credentials. // - // password-not-available: A password is not available for my instance. + // password-not-available: A password is not available for my instance. // - // performance-network: My instance is experiencing performance problems which - // I believe are network related. + // performance-network: My instance is experiencing performance problems + // which I believe are network related. // - // performance-instance-store: My instance is experiencing performance problems + // performance-instance-store: My instance is experiencing performance problems // which I believe are related to the instance stores. // - // performance-ebs-volume: My instance is experiencing performance problems + // performance-ebs-volume: My instance is experiencing performance problems // which I believe are related to an EBS volume. // - // performance-other: My instance is experiencing performance problems. + // performance-other: My instance is experiencing performance problems. // - // other: [explain using the description parameter] + // other: [explain using the description parameter] ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"` // The time at which the reported instance health state began. @@ -20625,6 +23037,25 @@ func (s ReportInstanceStatusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReportInstanceStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReportInstanceStatusInput"} + if s.Instances == nil { + invalidParams.Add(request.NewErrParamRequired("Instances")) + } + if s.ReasonCodes == nil { + invalidParams.Add(request.NewErrParamRequired("ReasonCodes")) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ReportInstanceStatusOutput struct { _ struct{} `type:"structure"` } @@ -20663,6 +23094,24 @@ func (s RequestSpotFleetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestSpotFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestSpotFleetInput"} + if s.SpotFleetRequestConfig == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestConfig")) + } + if s.SpotFleetRequestConfig != nil { + if err := s.SpotFleetRequestConfig.Validate(); err != nil { + invalidParams.AddNested("SpotFleetRequestConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of RequestSpotFleet. type RequestSpotFleetOutput struct { _ struct{} `type:"structure"` @@ -20781,6 +23230,24 @@ func (s RequestSpotInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestSpotInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestSpotInstancesInput"} + if s.SpotPrice == nil { + invalidParams.Add(request.NewErrParamRequired("SpotPrice")) + } + if s.LaunchSpecification != nil { + if err := s.LaunchSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of RequestSpotInstances. type RequestSpotInstancesOutput struct { _ struct{} `type:"structure"` @@ -20807,6 +23274,9 @@ type RequestSpotLaunchSpecification struct { AddressingType *string `locationName:"addressingType" type:"string"` // One or more block device mapping entries. + // + // Although you can specify encrypted EBS volumes in this block device mapping + // for your Spot Instances, these volumes are not encrypted. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` // Indicates whether the instance is optimized for EBS I/O. This optimization @@ -20866,6 +23336,31 @@ func (s RequestSpotLaunchSpecification) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestSpotLaunchSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestSpotLaunchSpecification"} + if s.Monitoring != nil { + if err := s.Monitoring.Validate(); err != nil { + invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) + } + } + if s.NetworkInterfaces != nil { + for i, v := range s.NetworkInterfaces { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a reservation. type Reservation struct { _ struct{} `type:"structure"` @@ -21121,6 +23616,7 @@ func (s ReservedInstancesModification) GoString() string { return s.String() } +// Describes the modification request/s. type ReservedInstancesModificationResult struct { _ struct{} `type:"structure"` @@ -21201,6 +23697,7 @@ func (s ReservedInstancesOffering) GoString() string { return s.String() } +// Contains the parameters for ResetImageAttribute. type ResetImageAttributeInput struct { _ struct{} `type:"structure"` @@ -21228,6 +23725,22 @@ func (s ResetImageAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetImageAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ResetImageAttributeOutput struct { _ struct{} `type:"structure"` } @@ -21242,6 +23755,7 @@ func (s ResetImageAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ResetInstanceAttribute. type ResetInstanceAttributeInput struct { _ struct{} `type:"structure"` @@ -21268,6 +23782,22 @@ func (s ResetInstanceAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetInstanceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetInstanceAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ResetInstanceAttributeOutput struct { _ struct{} `type:"structure"` } @@ -21282,6 +23812,7 @@ func (s ResetInstanceAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ResetNetworkInterfaceAttribute. type ResetNetworkInterfaceAttributeInput struct { _ struct{} `type:"structure"` @@ -21308,6 +23839,19 @@ func (s ResetNetworkInterfaceAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetNetworkInterfaceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetNetworkInterfaceAttributeInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ResetNetworkInterfaceAttributeOutput struct { _ struct{} `type:"structure"` } @@ -21322,6 +23866,7 @@ func (s ResetNetworkInterfaceAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ResetSnapshotAttribute. type ResetSnapshotAttributeInput struct { _ struct{} `type:"structure"` @@ -21349,6 +23894,22 @@ func (s ResetSnapshotAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetSnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetSnapshotAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ResetSnapshotAttributeOutput struct { _ struct{} `type:"structure"` } @@ -21363,6 +23924,7 @@ func (s ResetSnapshotAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for RestoreAddressToClassic. type RestoreAddressToClassicInput struct { _ struct{} `type:"structure"` @@ -21386,6 +23948,20 @@ func (s RestoreAddressToClassicInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreAddressToClassicInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreAddressToClassicInput"} + if s.PublicIp == nil { + invalidParams.Add(request.NewErrParamRequired("PublicIp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of RestoreAddressToClassic. type RestoreAddressToClassicOutput struct { _ struct{} `type:"structure"` @@ -21406,6 +23982,7 @@ func (s RestoreAddressToClassicOutput) GoString() string { return s.String() } +// Contains the parameters for RevokeSecurityGroupEgress. type RevokeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` @@ -21459,6 +24036,19 @@ func (s RevokeSecurityGroupEgressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeSecurityGroupEgressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeSecurityGroupEgressInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RevokeSecurityGroupEgressOutput struct { _ struct{} `type:"structure"` } @@ -21473,6 +24063,7 @@ func (s RevokeSecurityGroupEgressOutput) GoString() string { return s.String() } +// Contains the parameters for RevokeSecurityGroupIngress. type RevokeSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -21509,15 +24100,16 @@ type RevokeSecurityGroupIngressInput struct { // specify this parameter in combination with the following parameters: the // CIDR IP address range, the start of the port range, the IP protocol, and // the end of the port range. For EC2-VPC, the source security group must be - // in the same VPC. + // in the same VPC. To revoke a specific rule for an IP protocol and port range, + // use a set of IP permissions instead. SourceSecurityGroupName *string `type:"string"` - // [EC2-Classic, default VPC] The AWS account ID of the source security group. - // For EC2-VPC, the source security group must be in the same VPC. You can't - // specify this parameter in combination with the following parameters: the - // CIDR IP address range, the IP protocol, the start of the port range, and - // the end of the port range. To revoke a specific rule for an IP protocol and - // port range, use a set of IP permissions instead. + // [EC2-Classic] The AWS account ID of the source security group, if the source + // security group is in a different account. You can't specify this parameter + // in combination with the following parameters: the CIDR IP address range, + // the IP protocol, the start of the port range, and the end of the port range. + // To revoke a specific rule for an IP protocol and port range, use a set of + // IP permissions instead. SourceSecurityGroupOwnerId *string `type:"string"` // The end of port range for the TCP and UDP protocols, or an ICMP code number. @@ -21576,10 +24168,12 @@ type Route struct { // Describes how the route was created. // - // CreateRouteTable indicates that route was automatically created when the - // route table was created. CreateRoute indicates that the route was manually - // added to the route table. EnableVgwRoutePropagation indicates that the route - // was propagated by route propagation. + // CreateRouteTable - The route was automatically created when the route table + // was created. + // + // CreateRoute - The route was manually added to the route table. + // + // EnableVgwRoutePropagation - The route was propagated by route propagation. Origin *string `locationName:"origin" type:"string" enum:"RouteOrigin"` // The state of the route. The blackhole state indicates that the route's target @@ -21661,6 +24255,7 @@ func (s RouteTableAssociation) GoString() string { return s.String() } +// Contains the parameters for RunInstances. type RunInstancesInput struct { _ struct{} `type:"structure"` @@ -21814,6 +24409,40 @@ func (s RunInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunInstancesInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + if s.MaxCount == nil { + invalidParams.Add(request.NewErrParamRequired("MaxCount")) + } + if s.MinCount == nil { + invalidParams.Add(request.NewErrParamRequired("MinCount")) + } + if s.Monitoring != nil { + if err := s.Monitoring.Validate(); err != nil { + invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) + } + } + if s.NetworkInterfaces != nil { + for i, v := range s.NetworkInterfaces { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the monitoring for the instance. type RunInstancesMonitoringEnabled struct { _ struct{} `type:"structure"` @@ -21832,6 +24461,19 @@ func (s RunInstancesMonitoringEnabled) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunInstancesMonitoringEnabled) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunInstancesMonitoringEnabled"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the parameters for RunScheduledInstances. type RunScheduledInstancesInput struct { _ struct{} `type:"structure"` @@ -21868,6 +24510,27 @@ func (s RunScheduledInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunScheduledInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunScheduledInstancesInput"} + if s.LaunchSpecification == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchSpecification")) + } + if s.ScheduledInstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledInstanceId")) + } + if s.LaunchSpecification != nil { + if err := s.LaunchSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of RunScheduledInstances. type RunScheduledInstancesOutput struct { _ struct{} `type:"structure"` @@ -21904,8 +24567,9 @@ type S3Storage struct { // The beginning of the file name of the AMI. Prefix *string `locationName:"prefix" type:"string"` - // A Base64-encoded Amazon S3 upload policy that gives Amazon EC2 permission - // to upload items into Amazon S3 on your behalf. + // A base64-encoded Amazon S3 upload policy that gives Amazon EC2 permission + // to upload items into Amazon S3 on your behalf. For command line tools, base64 + // encoding is performed for you. // // UploadPolicy is automatically base64 encoded/decoded by the SDK. UploadPolicy []byte `locationName:"uploadPolicy" type:"blob"` @@ -22160,19 +24824,18 @@ type ScheduledInstancesEbs struct { Encrypted *bool `type:"boolean"` // The number of I/O operations per second (IOPS) that the volume supports. - // For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that - // are provisioned for the volume. For General Purpose (SSD) volumes, 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 - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // For io1 volumes, this represents the number of IOPS that are provisioned + // for the volume. For gp2 volumes, 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 gp2 baseline performance, I/O credits, + // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and - // 3 to 10000 for General Purpose (SSD) volumes. + // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for + // gp2 volumes. // - // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create standard or gp2 volumes. + // Condition: This parameter is required for requests to create io1volumes; + // it is not used in requests to create gp2, st1, sc1, or standard volumes. Iops *int64 `type:"integer"` // The ID of the snapshot. @@ -22184,8 +24847,8 @@ type ScheduledInstancesEbs struct { // a volume size, the default is the snapshot size. VolumeSize *int64 `type:"integer"` - // The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned - // IOPS (SSD) volumes, and standard for Magnetic volumes. + // The volume type. gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, + // Throughput Optimized HDD for st1, Cold HDD for sc1, or standard for Magnetic. // // Default: standard VolumeType *string `type:"string"` @@ -22289,6 +24952,19 @@ func (s ScheduledInstancesLaunchSpecification) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduledInstancesLaunchSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduledInstancesLaunchSpecification"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes whether monitoring is enabled for a Scheduled Instance. type ScheduledInstancesMonitoring struct { _ struct{} `type:"structure"` @@ -22462,6 +25138,22 @@ func (s SlotDateTimeRangeRequest) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SlotDateTimeRangeRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SlotDateTimeRangeRequest"} + if s.EarliestTime == nil { + invalidParams.Add(request.NewErrParamRequired("EarliestTime")) + } + if s.LatestTime == nil { + invalidParams.Add(request.NewErrParamRequired("LatestTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the time period for a Scheduled Instance to start its first schedule. type SlotStartTimeRangeRequest struct { _ struct{} `type:"structure"` @@ -22584,7 +25276,7 @@ type SnapshotDetail struct { // The URL used to access the disk image. Url *string `locationName:"url" type:"string"` - // Describes the S3 bucket for the disk image. + // The S3 bucket for the disk image. UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` } @@ -22614,7 +25306,7 @@ type SnapshotDiskContainer struct { // a https URL (https://..) or an Amazon S3 URL (s3://..). Url *string `type:"string"` - // Describes the S3 bucket for the disk image. + // The S3 bucket for the disk image. UserBucket *UserBucket `type:"structure"` } @@ -22784,6 +25476,26 @@ func (s SpotFleetLaunchSpecification) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SpotFleetLaunchSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SpotFleetLaunchSpecification"} + if s.NetworkInterfaces != nil { + for i, v := range s.NetworkInterfaces { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes whether monitoring is enabled. type SpotFleetMonitoring struct { _ struct{} `type:"structure"` @@ -22889,6 +25601,41 @@ func (s SpotFleetRequestConfigData) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SpotFleetRequestConfigData) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SpotFleetRequestConfigData"} + if s.IamFleetRole == nil { + invalidParams.Add(request.NewErrParamRequired("IamFleetRole")) + } + if s.LaunchSpecifications == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchSpecifications")) + } + if s.LaunchSpecifications != nil && len(s.LaunchSpecifications) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LaunchSpecifications", 1)) + } + if s.SpotPrice == nil { + invalidParams.Add(request.NewErrParamRequired("SpotPrice")) + } + if s.TargetCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacity")) + } + if s.LaunchSpecifications != nil { + for i, v := range s.LaunchSpecifications { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchSpecifications", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a Spot instance request. type SpotInstanceRequest struct { _ struct{} `type:"structure"` @@ -23074,6 +25821,7 @@ func (s SpotPrice) GoString() string { return s.String() } +// Contains the parameters for StartInstances. type StartInstancesInput struct { _ struct{} `type:"structure"` @@ -23100,6 +25848,20 @@ func (s StartInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of StartInstances. type StartInstancesOutput struct { _ struct{} `type:"structure"` @@ -23161,6 +25923,7 @@ func (s StateReason) GoString() string { return s.String() } +// Contains the parameters for StopInstances. type StopInstancesInput struct { _ struct{} `type:"structure"` @@ -23192,6 +25955,20 @@ func (s StopInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of StopInstances. type StopInstancesOutput struct { _ struct{} `type:"structure"` @@ -23324,6 +26101,7 @@ func (s TagDescription) GoString() string { return s.String() } +// Contains the parameters for TerminateInstances. type TerminateInstancesInput struct { _ struct{} `type:"structure"` @@ -23347,6 +26125,20 @@ func (s TerminateInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of TerminateInstances. type TerminateInstancesOutput struct { _ struct{} `type:"structure"` @@ -23364,6 +26156,7 @@ func (s TerminateInstancesOutput) GoString() string { return s.String() } +// Contains the parameters for UnassignPrivateIpAddresses. type UnassignPrivateIpAddressesInput struct { _ struct{} `type:"structure"` @@ -23385,6 +26178,22 @@ func (s UnassignPrivateIpAddressesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnassignPrivateIpAddressesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnassignPrivateIpAddressesInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.PrivateIpAddresses == nil { + invalidParams.Add(request.NewErrParamRequired("PrivateIpAddresses")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UnassignPrivateIpAddressesOutput struct { _ struct{} `type:"structure"` } @@ -23399,6 +26208,7 @@ func (s UnassignPrivateIpAddressesOutput) GoString() string { return s.String() } +// Contains the parameters for UnmonitorInstances. type UnmonitorInstancesInput struct { _ struct{} `type:"structure"` @@ -23422,6 +26232,20 @@ func (s UnmonitorInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnmonitorInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnmonitorInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the output of UnmonitorInstances. type UnmonitorInstancesOutput struct { _ struct{} `type:"structure"` @@ -23551,13 +26375,16 @@ type UserIdGroupPair struct { // The name of the security group. In a request, use this parameter for a security // group in EC2-Classic or a default VPC only. For a security group in a nondefault - // VPC, use GroupId. + // VPC, use the security group ID. GroupName *string `locationName:"groupName" type:"string"` // The status of a VPC peering connection, if applicable. PeeringStatus *string `locationName:"peeringStatus" type:"string"` // The ID of an AWS account. + // + // [EC2-Classic] Required when adding or removing rules that reference a security + // group in another AWS account. UserId *string `locationName:"userId" type:"string"` // The ID of the VPC for the referenced security group, if applicable. @@ -23625,18 +26452,18 @@ type Volume struct { Encrypted *bool `locationName:"encrypted" type:"boolean"` // The number of I/O operations per second (IOPS) that the volume supports. - // For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that - // are provisioned for the volume. For General Purpose (SSD) volumes, this represents + // For Provisioned IOPS SSD volumes, this represents the number of IOPS that + // are provisioned for the volume. For General Purpose SSD volumes, this represents // the baseline performance of the volume and the rate at which the volume accumulates - // I/O credits for bursting. For more information on General Purpose (SSD) baseline + // I/O credits for bursting. For more information on General Purpose SSD baseline // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and - // 3 to 10000 for General Purpose (SSD) volumes. + // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for + // gp2 volumes. // // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create standard or gp2 volumes. + // it is not used in requests to create gp2, st1, sc1, or standard volumes. Iops *int64 `locationName:"iops" type:"integer"` // The full ARN of the AWS Key Management Service (AWS KMS) customer master @@ -23658,8 +26485,9 @@ type Volume struct { // The ID of the volume. VolumeId *string `locationName:"volumeId" type:"string"` - // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for - // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes. + // The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned + // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard + // for Magnetic volumes. VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` } @@ -23724,6 +26552,19 @@ func (s VolumeDetail) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *VolumeDetail) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VolumeDetail"} + if s.Size == nil { + invalidParams.Add(request.NewErrParamRequired("Size")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a volume status operation code. type VolumeStatusAction struct { _ struct{} `type:"structure"` @@ -23975,13 +26816,15 @@ func (s VpcEndpoint) GoString() string { type VpcPeeringConnection struct { _ struct{} `type:"structure"` - // The information of the peer VPC. + // Information about the peer VPC. CIDR block information is not returned when + // creating a VPC peering connection, or when describing a VPC peering connection + // that's in the initiating-request or pending-acceptance state. AccepterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"accepterVpcInfo" type:"structure"` // The time that an unaccepted VPC peering connection will expire. ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"` - // The information of the requester VPC. + // Information about the requester VPC. RequesterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"requesterVpcInfo" type:"structure"` // The status of the VPC peering connection. @@ -24004,6 +26847,29 @@ func (s VpcPeeringConnection) GoString() string { return s.String() } +// Describes the VPC peering connection options. +type VpcPeeringConnectionOptionsDescription struct { + _ struct{} `type:"structure"` + + // Indicates whether a local ClassicLink connection can communicate with the + // peer VPC over the VPC peering connection. + AllowEgressFromLocalClassicLinkToRemoteVpc *bool `locationName:"allowEgressFromLocalClassicLinkToRemoteVpc" type:"boolean"` + + // Indicates whether a local VPC can communicate with a ClassicLink connection + // in the peer VPC over the VPC peering connection. + AllowEgressFromLocalVpcToRemoteClassicLink *bool `locationName:"allowEgressFromLocalVpcToRemoteClassicLink" type:"boolean"` +} + +// String returns the string representation +func (s VpcPeeringConnectionOptionsDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcPeeringConnectionOptionsDescription) GoString() string { + return s.String() +} + // Describes the status of a VPC peering connection. type VpcPeeringConnectionStateReason struct { _ struct{} `type:"structure"` @@ -24035,6 +26901,10 @@ type VpcPeeringConnectionVpcInfo struct { // The AWS account ID of the VPC owner. OwnerId *string `locationName:"ownerId" type:"string"` + // Information about the VPC peering connection options for the accepter or + // requester VPC. + PeeringOptions *VpcPeeringConnectionOptionsDescription `locationName:"peeringOptions" type:"structure"` + // The ID of the VPC. VpcId *string `locationName:"vpcId" type:"string"` } @@ -25100,6 +27970,10 @@ const ( VolumeTypeIo1 = "io1" // @enum VolumeType VolumeTypeGp2 = "gp2" + // @enum VolumeType + VolumeTypeSc1 = "sc1" + // @enum VolumeType + VolumeTypeSt1 = "st1" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go index a9118a208..e263b0cef 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go @@ -493,7 +493,7 @@ func (c *EC2) WaitUntilNatGatewayAvailable(input *DescribeNatGatewaysInput) erro State: "retry", Matcher: "error", Argument: "", - Expected: "InvalidNatGatewayIDNotFound", + Expected: "NatGatewayNotFound", }, }, } @@ -522,7 +522,7 @@ func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterface State: "failure", Matcher: "error", Argument: "", - Expected: "InvalidNetworkInterfaceIDNotFound", + Expected: "InvalidNetworkInterfaceID.NotFound", }, }, } diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index bf1445949..57a875905 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -489,7 +489,7 @@ type AuthorizationData struct { // The registry URL to use for this authorization token in a docker login command. // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com. - // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com. + // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com.. ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"` } @@ -527,6 +527,28 @@ func (s BatchCheckLayerAvailabilityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchCheckLayerAvailabilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"} + if s.LayerDigests == nil { + invalidParams.Add(request.NewErrParamRequired("LayerDigests")) + } + if s.LayerDigests != nil && len(s.LayerDigests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type BatchCheckLayerAvailabilityOutput struct { _ struct{} `type:"structure"` @@ -575,6 +597,28 @@ func (s BatchDeleteImageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchDeleteImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"} + if s.ImageIds == nil { + invalidParams.Add(request.NewErrParamRequired("ImageIds")) + } + if s.ImageIds != nil && len(s.ImageIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type BatchDeleteImageOutput struct { _ struct{} `type:"structure"` @@ -620,6 +664,28 @@ func (s BatchGetImageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"} + if s.ImageIds == nil { + invalidParams.Add(request.NewErrParamRequired("ImageIds")) + } + if s.ImageIds != nil && len(s.ImageIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type BatchGetImageOutput struct { _ struct{} `type:"structure"` @@ -668,6 +734,31 @@ func (s CompleteLayerUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompleteLayerUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"} + if s.LayerDigests == nil { + invalidParams.Add(request.NewErrParamRequired("LayerDigests")) + } + if s.LayerDigests != nil && len(s.LayerDigests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CompleteLayerUploadOutput struct { _ struct{} `type:"structure"` @@ -713,6 +804,22 @@ func (s CreateRepositoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateRepositoryOutput struct { _ struct{} `type:"structure"` @@ -754,6 +861,22 @@ func (s DeleteRepositoryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRepositoryOutput struct { _ struct{} `type:"structure"` @@ -794,6 +917,22 @@ func (s DeleteRepositoryPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRepositoryPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRepositoryPolicyOutput struct { _ struct{} `type:"structure"` @@ -856,6 +995,22 @@ func (s DescribeRepositoriesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRepositoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoriesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeRepositoriesOutput struct { _ struct{} `type:"structure"` @@ -898,6 +1053,19 @@ func (s GetAuthorizationTokenInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAuthorizationTokenInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAuthorizationTokenInput"} + if s.RegistryIds != nil && len(s.RegistryIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegistryIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetAuthorizationTokenOutput struct { _ struct{} `type:"structure"` @@ -940,6 +1108,25 @@ func (s GetDownloadUrlForLayerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDownloadUrlForLayerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDownloadUrlForLayerInput"} + if s.LayerDigest == nil { + invalidParams.Add(request.NewErrParamRequired("LayerDigest")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetDownloadUrlForLayerOutput struct { _ struct{} `type:"structure"` @@ -981,6 +1168,22 @@ func (s GetRepositoryPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRepositoryPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRepositoryPolicyInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetRepositoryPolicyOutput struct { _ struct{} `type:"structure"` @@ -1095,6 +1298,22 @@ func (s InitiateLayerUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InitiateLayerUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InitiateLayerUploadInput"} + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type InitiateLayerUploadOutput struct { _ struct{} `type:"structure"` @@ -1201,6 +1420,25 @@ func (s ListImagesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListImagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListImagesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListImagesOutput struct { _ struct{} `type:"structure"` @@ -1249,6 +1487,25 @@ func (s PutImageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutImageInput"} + if s.ImageManifest == nil { + invalidParams.Add(request.NewErrParamRequired("ImageManifest")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutImageOutput struct { _ struct{} `type:"structure"` @@ -1281,6 +1538,10 @@ type Repository struct { // The name of the repository. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` + + // The URI for the repository. You can use this URI for Docker push and pull + // operations. + RepositoryUri *string `locationName:"repositoryUri" type:"string"` } // String returns the string representation @@ -1322,6 +1583,25 @@ func (s SetRepositoryPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetRepositoryPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetRepositoryPolicyInput"} + if s.PolicyText == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyText")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetRepositoryPolicyOutput struct { _ struct{} `type:"structure"` @@ -1381,6 +1661,34 @@ func (s UploadLayerPartInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadLayerPartInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadLayerPartInput"} + if s.LayerPartBlob == nil { + invalidParams.Add(request.NewErrParamRequired("LayerPartBlob")) + } + if s.PartFirstByte == nil { + invalidParams.Add(request.NewErrParamRequired("PartFirstByte")) + } + if s.PartLastByte == nil { + invalidParams.Add(request.NewErrParamRequired("PartLastByte")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UploadLayerPartOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 18398532c..70941f1a6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -4,6 +4,7 @@ package ecs import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -1034,6 +1035,19 @@ func (s Attribute) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Attribute) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Attribute"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A regional grouping of one or more container instances on which you can run // task requests. Each account receives a default cluster the first time you // use the Amazon ECS service, but you may also create other clusters. Clusters @@ -1392,6 +1406,41 @@ func (s ContainerDefinition) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContainerDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContainerDefinition"} + if s.ExtraHosts != nil { + for i, v := range s.ExtraHosts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExtraHosts", i), err.(request.ErrInvalidParams)) + } + } + } + if s.LogConfiguration != nil { + if err := s.LogConfiguration.Validate(); err != nil { + invalidParams.AddNested("LogConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.Ulimits != nil { + for i, v := range s.Ulimits { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // An EC2 instance that is running the Amazon ECS agent and has been registered // with a cluster. type ContainerInstance struct { @@ -1569,6 +1618,25 @@ func (s CreateServiceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateServiceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"} + if s.DesiredCount == nil { + invalidParams.Add(request.NewErrParamRequired("DesiredCount")) + } + if s.ServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceName")) + } + if s.TaskDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateServiceOutput struct { _ struct{} `type:"structure"` @@ -1603,6 +1671,19 @@ func (s DeleteClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} + if s.Cluster == nil { + invalidParams.Add(request.NewErrParamRequired("Cluster")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteClusterOutput struct { _ struct{} `type:"structure"` @@ -1641,6 +1722,19 @@ func (s DeleteServiceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServiceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"} + if s.Service == nil { + invalidParams.Add(request.NewErrParamRequired("Service")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteServiceOutput struct { _ struct{} `type:"structure"` @@ -1766,6 +1860,19 @@ func (s DeregisterContainerInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterContainerInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterContainerInstanceInput"} + if s.ContainerInstance == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerInstance")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterContainerInstanceOutput struct { _ struct{} `type:"structure"` @@ -1802,6 +1909,19 @@ func (s DeregisterTaskDefinitionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterTaskDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskDefinitionInput"} + if s.TaskDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterTaskDefinitionOutput struct { _ struct{} `type:"structure"` @@ -1880,6 +2000,19 @@ func (s DescribeContainerInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeContainerInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInstancesInput"} + if s.ContainerInstances == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerInstances")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeContainerInstancesOutput struct { _ struct{} `type:"structure"` @@ -1921,6 +2054,19 @@ func (s DescribeServicesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeServicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeServicesInput"} + if s.Services == nil { + invalidParams.Add(request.NewErrParamRequired("Services")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeServicesOutput struct { _ struct{} `type:"structure"` @@ -1960,6 +2106,19 @@ func (s DescribeTaskDefinitionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTaskDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTaskDefinitionInput"} + if s.TaskDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeTaskDefinitionOutput struct { _ struct{} `type:"structure"` @@ -1999,6 +2158,19 @@ func (s DescribeTasksInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTasksInput"} + if s.Tasks == nil { + invalidParams.Add(request.NewErrParamRequired("Tasks")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeTasksOutput struct { _ struct{} `type:"structure"` @@ -2106,6 +2278,22 @@ func (s HostEntry) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *HostEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HostEntry"} + if s.Hostname == nil { + invalidParams.Add(request.NewErrParamRequired("Hostname")) + } + if s.IpAddress == nil { + invalidParams.Add(request.NewErrParamRequired("IpAddress")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Details on a container instance host volume. type HostVolumeProperties struct { _ struct{} `type:"structure"` @@ -2595,6 +2783,19 @@ func (s LogConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LogConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LogConfiguration"} + if s.LogDriver == nil { + invalidParams.Add(request.NewErrParamRequired("LogDriver")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Details on a volume mount point that is used in a container definition. type MountPoint struct { _ struct{} `type:"structure"` @@ -2745,6 +2946,26 @@ func (s RegisterContainerInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterContainerInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterContainerInstanceInput"} + if s.Attributes != nil { + for i, v := range s.Attributes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterContainerInstanceOutput struct { _ struct{} `type:"structure"` @@ -2791,6 +3012,32 @@ func (s RegisterTaskDefinitionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterTaskDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterTaskDefinitionInput"} + if s.ContainerDefinitions == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerDefinitions")) + } + if s.Family == nil { + invalidParams.Add(request.NewErrParamRequired("Family")) + } + if s.ContainerDefinitions != nil { + for i, v := range s.ContainerDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContainerDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterTaskDefinitionOutput struct { _ struct{} `type:"structure"` @@ -2895,6 +3142,19 @@ func (s RunTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunTaskInput"} + if s.TaskDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RunTaskOutput struct { _ struct{} `type:"structure"` @@ -3062,6 +3322,22 @@ func (s StartTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartTaskInput"} + if s.ContainerInstances == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerInstances")) + } + if s.TaskDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type StartTaskOutput struct { _ struct{} `type:"structure"` @@ -3111,6 +3387,19 @@ func (s StopTaskInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopTaskInput"} + if s.Task == nil { + invalidParams.Add(request.NewErrParamRequired("Task")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type StopTaskOutput struct { _ struct{} `type:"structure"` @@ -3374,6 +3663,25 @@ func (s Ulimit) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Ulimit) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Ulimit"} + if s.HardLimit == nil { + invalidParams.Add(request.NewErrParamRequired("HardLimit")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.SoftLimit == nil { + invalidParams.Add(request.NewErrParamRequired("SoftLimit")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateContainerAgentInput struct { _ struct{} `type:"structure"` @@ -3398,6 +3706,19 @@ func (s UpdateContainerAgentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateContainerAgentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateContainerAgentInput"} + if s.ContainerInstance == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerInstance")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateContainerAgentOutput struct { _ struct{} `type:"structure"` @@ -3453,6 +3774,19 @@ func (s UpdateServiceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateServiceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"} + if s.Service == nil { + invalidParams.Add(request.NewErrParamRequired("Service")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateServiceOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index 71673c570..0fb29b491 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -4,6 +4,7 @@ package efs import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -548,6 +549,22 @@ func (s CreateFileSystemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFileSystemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"} + if s.CreationToken == nil { + invalidParams.Add(request.NewErrParamRequired("CreationToken")) + } + if s.CreationToken != nil && len(*s.CreationToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateMountTargetInput struct { _ struct{} `type:"structure"` @@ -575,6 +592,22 @@ func (s CreateMountTargetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateMountTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateMountTargetInput"} + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateTagsInput struct { _ struct{} `type:"structure"` @@ -596,6 +629,32 @@ func (s CreateTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + 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 +} + type CreateTagsOutput struct { _ struct{} `type:"structure"` } @@ -627,6 +686,19 @@ func (s DeleteFileSystemInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFileSystemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"} + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteFileSystemOutput struct { _ struct{} `type:"structure"` } @@ -658,6 +730,19 @@ func (s DeleteMountTargetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMountTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMountTargetInput"} + if s.MountTargetId == nil { + invalidParams.Add(request.NewErrParamRequired("MountTargetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteMountTargetOutput struct { _ struct{} `type:"structure"` } @@ -692,6 +777,22 @@ func (s DeleteTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteTagsOutput struct { _ struct{} `type:"structure"` } @@ -740,6 +841,22 @@ func (s DescribeFileSystemsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFileSystemsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"} + if s.CreationToken != nil && len(*s.CreationToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeFileSystemsOutput struct { _ struct{} `type:"structure"` @@ -781,6 +898,19 @@ func (s DescribeMountTargetSecurityGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMountTargetSecurityGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetSecurityGroupsInput"} + if s.MountTargetId == nil { + invalidParams.Add(request.NewErrParamRequired("MountTargetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeMountTargetSecurityGroupsOutput struct { _ struct{} `type:"structure"` @@ -829,6 +959,19 @@ func (s DescribeMountTargetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMountTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetsInput"} + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeMountTargetsOutput struct { _ struct{} `type:"structure"` @@ -882,6 +1025,22 @@ func (s DescribeTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeTagsOutput struct { _ struct{} `type:"structure"` @@ -1009,6 +1168,19 @@ func (s ModifyMountTargetSecurityGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyMountTargetSecurityGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyMountTargetSecurityGroupsInput"} + if s.MountTargetId == nil { + invalidParams.Add(request.NewErrParamRequired("MountTargetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyMountTargetSecurityGroupsOutput struct { _ struct{} `type:"structure"` } @@ -1083,6 +1255,25 @@ 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 +} + const ( // @enum LifeCycleState LifeCycleStateCreating = "creating" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index 907aa394d..3409de9d6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -1379,6 +1379,22 @@ func (s AddTagsToResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of an AuthorizeCacheSecurityGroupIngress action. type AuthorizeCacheSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -1406,6 +1422,25 @@ func (s AuthorizeCacheSecurityGroupIngressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeCacheSecurityGroupIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeCacheSecurityGroupIngressInput"} + if s.CacheSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) + } + if s.EC2SecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupName")) + } + if s.EC2SecurityGroupOwnerId == nil { + invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupOwnerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AuthorizeCacheSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` @@ -1898,6 +1933,22 @@ func (s CopySnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopySnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} + if s.SourceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) + } + if s.TargetSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CopySnapshotOutput struct { _ struct{} `type:"structure"` @@ -2126,6 +2177,19 @@ func (s CreateCacheClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCacheClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheClusterInput"} + if s.CacheClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateCacheClusterOutput struct { _ struct{} `type:"structure"` @@ -2170,6 +2234,25 @@ func (s CreateCacheParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCacheParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheParameterGroupInput"} + if s.CacheParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) + } + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateCacheParameterGroupOutput struct { _ struct{} `type:"structure"` @@ -2214,6 +2297,22 @@ func (s CreateCacheSecurityGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCacheSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheSecurityGroupInput"} + if s.CacheSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateCacheSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -2261,6 +2360,25 @@ func (s CreateCacheSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCacheSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheSubnetGroupInput"} + if s.CacheSubnetGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupDescription")) + } + if s.CacheSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateCacheSubnetGroupOutput struct { _ struct{} `type:"structure"` @@ -2469,6 +2587,22 @@ func (s CreateReplicationGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateReplicationGroupInput"} + if s.ReplicationGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupDescription")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateReplicationGroupOutput struct { _ struct{} `type:"structure"` @@ -2508,6 +2642,22 @@ func (s CreateSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} + if s.CacheClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) + } + if s.SnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateSnapshotOutput struct { _ struct{} `type:"structure"` @@ -2550,6 +2700,19 @@ func (s DeleteCacheClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCacheClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheClusterInput"} + if s.CacheClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteCacheClusterOutput struct { _ struct{} `type:"structure"` @@ -2588,6 +2751,19 @@ func (s DeleteCacheParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCacheParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheParameterGroupInput"} + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteCacheParameterGroupOutput struct { _ struct{} `type:"structure"` } @@ -2622,6 +2798,19 @@ func (s DeleteCacheSecurityGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCacheSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSecurityGroupInput"} + if s.CacheSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteCacheSecurityGroupOutput struct { _ struct{} `type:"structure"` } @@ -2656,6 +2845,19 @@ func (s DeleteCacheSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCacheSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSubnetGroupInput"} + if s.CacheSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteCacheSubnetGroupOutput struct { _ struct{} `type:"structure"` } @@ -2699,6 +2901,19 @@ func (s DeleteReplicationGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationGroupInput"} + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteReplicationGroupOutput struct { _ struct{} `type:"structure"` @@ -2734,6 +2949,19 @@ func (s DeleteSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} + if s.SnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSnapshotOutput struct { _ struct{} `type:"structure"` @@ -2974,6 +3202,19 @@ func (s DescribeCacheParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCacheParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCacheParametersInput"} + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output of a DescribeCacheParameters action. type DescribeCacheParametersOutput struct { _ struct{} `type:"structure"` @@ -3140,6 +3381,19 @@ func (s DescribeEngineDefaultParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEngineDefaultParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} + if s.CacheParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeEngineDefaultParametersOutput struct { _ struct{} `type:"structure"` @@ -3734,6 +3988,19 @@ 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.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of a ModifyCacheCluster action. type ModifyCacheClusterInput struct { _ struct{} `type:"structure"` @@ -3940,6 +4207,19 @@ func (s ModifyCacheClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyCacheClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyCacheClusterInput"} + if s.CacheClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyCacheClusterOutput struct { _ struct{} `type:"structure"` @@ -3980,6 +4260,22 @@ func (s ModifyCacheParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyCacheParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyCacheParameterGroupInput"} + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) + } + if s.ParameterNameValues == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterNameValues")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of a ModifyCacheSubnetGroup action. type ModifyCacheSubnetGroupInput struct { _ struct{} `type:"structure"` @@ -4009,6 +4305,19 @@ func (s ModifyCacheSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyCacheSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyCacheSubnetGroupInput"} + if s.CacheSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyCacheSubnetGroupOutput struct { _ struct{} `type:"structure"` @@ -4161,6 +4470,19 @@ func (s ModifyReplicationGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyReplicationGroupInput"} + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyReplicationGroupOutput struct { _ struct{} `type:"structure"` @@ -4420,6 +4742,19 @@ func (s PurchaseReservedCacheNodesOfferingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseReservedCacheNodesOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedCacheNodesOfferingInput"} + if s.ReservedCacheNodesOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedCacheNodesOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PurchaseReservedCacheNodesOfferingOutput struct { _ struct{} `type:"structure"` @@ -4460,6 +4795,22 @@ func (s RebootCacheClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootCacheClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootCacheClusterInput"} + if s.CacheClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) + } + if s.CacheNodeIdsToReboot == nil { + invalidParams.Add(request.NewErrParamRequired("CacheNodeIdsToReboot")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RebootCacheClusterOutput struct { _ struct{} `type:"structure"` @@ -4527,6 +4878,22 @@ func (s RemoveTagsFromResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsFromResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains all of the attributes of a specific replication group. type ReplicationGroup struct { _ struct{} `type:"structure"` @@ -4754,6 +5121,22 @@ func (s ResetCacheParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetCacheParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetCacheParameterGroupInput"} + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) + } + if s.ParameterNameValues == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterNameValues")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the input of a RevokeCacheSecurityGroupIngress action. type RevokeCacheSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -4780,6 +5163,25 @@ func (s RevokeCacheSecurityGroupIngressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeCacheSecurityGroupIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeCacheSecurityGroupIngressInput"} + if s.CacheSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) + } + if s.EC2SecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupName")) + } + if s.EC2SecurityGroupOwnerId == nil { + invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupOwnerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RevokeCacheSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index 20b4afb26..760a82b49 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -4,6 +4,7 @@ package elasticbeanstalk import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -42,6 +43,35 @@ func (c *ElasticBeanstalk) AbortEnvironmentUpdate(input *AbortEnvironmentUpdateI return out, err } +const opApplyEnvironmentManagedAction = "ApplyEnvironmentManagedAction" + +// ApplyEnvironmentManagedActionRequest generates a request for the ApplyEnvironmentManagedAction operation. +func (c *ElasticBeanstalk) ApplyEnvironmentManagedActionRequest(input *ApplyEnvironmentManagedActionInput) (req *request.Request, output *ApplyEnvironmentManagedActionOutput) { + op := &request.Operation{ + Name: opApplyEnvironmentManagedAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ApplyEnvironmentManagedActionInput{} + } + + req = c.newRequest(op, input, output) + output = &ApplyEnvironmentManagedActionOutput{} + req.Data = output + return +} + +// Applies a scheduled managed action immediately. A managed action can be applied +// only if its status is Scheduled. Get the status and action ID of a managed +// action with DescribeEnvironmentManagedActions. +func (c *ElasticBeanstalk) ApplyEnvironmentManagedAction(input *ApplyEnvironmentManagedActionInput) (*ApplyEnvironmentManagedActionOutput, error) { + req, out := c.ApplyEnvironmentManagedActionRequest(input) + err := req.Send() + return out, err +} + const opCheckDNSAvailability = "CheckDNSAvailability" // CheckDNSAvailabilityRequest generates a request for the CheckDNSAvailability operation. @@ -540,6 +570,60 @@ func (c *ElasticBeanstalk) DescribeEnvironmentHealth(input *DescribeEnvironmentH return out, err } +const opDescribeEnvironmentManagedActionHistory = "DescribeEnvironmentManagedActionHistory" + +// DescribeEnvironmentManagedActionHistoryRequest generates a request for the DescribeEnvironmentManagedActionHistory operation. +func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionHistoryRequest(input *DescribeEnvironmentManagedActionHistoryInput) (req *request.Request, output *DescribeEnvironmentManagedActionHistoryOutput) { + op := &request.Operation{ + Name: opDescribeEnvironmentManagedActionHistory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEnvironmentManagedActionHistoryInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeEnvironmentManagedActionHistoryOutput{} + req.Data = output + return +} + +// Lists an environment's completed and failed managed actions. +func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionHistory(input *DescribeEnvironmentManagedActionHistoryInput) (*DescribeEnvironmentManagedActionHistoryOutput, error) { + req, out := c.DescribeEnvironmentManagedActionHistoryRequest(input) + err := req.Send() + return out, err +} + +const opDescribeEnvironmentManagedActions = "DescribeEnvironmentManagedActions" + +// DescribeEnvironmentManagedActionsRequest generates a request for the DescribeEnvironmentManagedActions operation. +func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionsRequest(input *DescribeEnvironmentManagedActionsInput) (req *request.Request, output *DescribeEnvironmentManagedActionsOutput) { + op := &request.Operation{ + Name: opDescribeEnvironmentManagedActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEnvironmentManagedActionsInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeEnvironmentManagedActionsOutput{} + req.Data = output + return +} + +// Lists an environment's upcoming and in-progress managed actions. +func (c *ElasticBeanstalk) DescribeEnvironmentManagedActions(input *DescribeEnvironmentManagedActionsInput) (*DescribeEnvironmentManagedActionsOutput, error) { + req, out := c.DescribeEnvironmentManagedActionsRequest(input) + err := req.Send() + return out, err +} + const opDescribeEnvironmentResources = "DescribeEnvironmentResources" // DescribeEnvironmentResourcesRequest generates a request for the DescribeEnvironmentResources operation. @@ -1067,6 +1151,19 @@ func (s AbortEnvironmentUpdateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AbortEnvironmentUpdateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AbortEnvironmentUpdateInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AbortEnvironmentUpdateOutput struct { _ struct{} `type:"structure"` } @@ -1218,6 +1315,70 @@ func (s ApplicationVersionDescriptionMessage) GoString() string { return s.String() } +// Request to execute a scheduled managed action immediately. +type ApplyEnvironmentManagedActionInput struct { + _ struct{} `type:"structure"` + + // The action ID of the scheduled managed action to execute. + ActionId *string `type:"string" required:"true"` + + // The environment ID of the target environment. + EnvironmentId *string `type:"string"` + + // The name of the target environment. + EnvironmentName *string `type:"string"` +} + +// String returns the string representation +func (s ApplyEnvironmentManagedActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplyEnvironmentManagedActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplyEnvironmentManagedActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplyEnvironmentManagedActionInput"} + if s.ActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ActionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// The result message containing information about the managed action. +type ApplyEnvironmentManagedActionOutput struct { + _ struct{} `type:"structure"` + + // A description of the managed action. + ActionDescription *string `type:"string"` + + // The action ID of the managed action. + ActionId *string `type:"string"` + + // The type of managed action. + ActionType *string `type:"string" enum:"ActionType"` + + // The status of the managed action. + Status *string `type:"string"` +} + +// String returns the string representation +func (s ApplyEnvironmentManagedActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplyEnvironmentManagedActionOutput) GoString() string { + return s.String() +} + // Describes an Auto Scaling launch configuration. type AutoScalingGroup struct { _ struct{} `type:"structure"` @@ -1299,6 +1460,22 @@ func (s CheckDNSAvailabilityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CheckDNSAvailabilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CheckDNSAvailabilityInput"} + if s.CNAMEPrefix == nil { + invalidParams.Add(request.NewErrParamRequired("CNAMEPrefix")) + } + if s.CNAMEPrefix != nil && len(*s.CNAMEPrefix) < 4 { + invalidParams.Add(request.NewErrParamMinLen("CNAMEPrefix", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Indicates if the specified CNAME is available. type CheckDNSAvailabilityOutput struct { _ struct{} `type:"structure"` @@ -1355,6 +1532,22 @@ func (s ComposeEnvironmentsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ComposeEnvironmentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ComposeEnvironmentsInput"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the possible values for a configuration option. type ConfigurationOptionDescription struct { _ struct{} `type:"structure"` @@ -1462,6 +1655,19 @@ func (s ConfigurationOptionSetting) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfigurationOptionSetting) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfigurationOptionSetting"} + if s.ResourceName != nil && len(*s.ResourceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the settings for a configuration set. type ConfigurationSettingsDescription struct { _ struct{} `type:"structure"` @@ -1537,6 +1743,22 @@ func (s CreateApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateApplicationVersionInput struct { _ struct{} `type:"structure"` @@ -1594,6 +1816,28 @@ func (s CreateApplicationVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApplicationVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApplicationVersionInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.VersionLabel == nil { + invalidParams.Add(request.NewErrParamRequired("VersionLabel")) + } + if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to create a configuration template. type CreateConfigurationTemplateInput struct { _ struct{} `type:"structure"` @@ -1664,6 +1908,43 @@ func (s CreateConfigurationTemplateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConfigurationTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConfigurationTemplateInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + 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.OptionSettings != nil { + for i, v := range s.OptionSettings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SourceConfiguration != nil { + if err := s.SourceConfiguration.Validate(); err != nil { + invalidParams.AddNested("SourceConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateEnvironmentInput struct { _ struct{} `type:"structure"` @@ -1683,7 +1964,7 @@ type CreateEnvironmentInput struct { // A unique name for the deployment environment. Used in the application URL. // - // Constraint: Must be from 4 to 23 characters in length. The name can contain + // Constraint: Must be from 4 to 40 characters in length. The name can contain // only letters, numbers, and hyphens. It cannot start or end with a hyphen. // This name must be unique in your account. If the specified name already exists, // AWS Elastic Beanstalk returns an InvalidParameterValue error. @@ -1755,6 +2036,67 @@ func (s CreateEnvironmentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEnvironmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CNAMEPrefix != nil && len(*s.CNAMEPrefix) < 4 { + invalidParams.Add(request.NewErrParamMinLen("CNAMEPrefix", 4)) + } + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) + } + if s.OptionSettings != nil { + for i, v := range s.OptionSettings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OptionsToRemove != nil { + for i, v := range s.OptionsToRemove { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToRemove", i), 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 +} + type CreateStorageLocationInput struct { _ struct{} `type:"structure"` } @@ -1809,6 +2151,22 @@ func (s DeleteApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteApplicationOutput struct { _ struct{} `type:"structure"` } @@ -1851,6 +2209,28 @@ func (s DeleteApplicationVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationVersionInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.VersionLabel == nil { + invalidParams.Add(request.NewErrParamRequired("VersionLabel")) + } + if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteApplicationVersionOutput struct { _ struct{} `type:"structure"` } @@ -1886,6 +2266,28 @@ func (s DeleteConfigurationTemplateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConfigurationTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationTemplateInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.TemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateName")) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteConfigurationTemplateOutput struct { _ struct{} `type:"structure"` } @@ -1921,6 +2323,28 @@ func (s DeleteEnvironmentConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEnvironmentConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentConfigurationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.EnvironmentName == nil { + invalidParams.Add(request.NewErrParamRequired("EnvironmentName")) + } + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteEnvironmentConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -1935,6 +2359,39 @@ func (s DeleteEnvironmentConfigurationOutput) GoString() string { return s.String() } +// Information about an application version deployment. +type Deployment struct { + _ struct{} `type:"structure"` + + // The ID of the deployment. This number increases by one each time that you + // deploy source code or change instance configuration settings. + DeploymentId *int64 `type:"long"` + + // For in-progress deployments, the time that the deloyment started. + // + // For completed deployments, the time that the deployment ended. + DeploymentTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The status of the deployment: + // + // In Progress : The deployment is in progress. Deployed : The deployment + // succeeded. Failed : The deployment failed. + Status *string `type:"string"` + + // The version label of the application version in the deployment. + VersionLabel *string `type:"string"` +} + +// String returns the string representation +func (s Deployment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Deployment) GoString() string { + return s.String() +} + // Result message containing a list of configuration descriptions. type DescribeApplicationVersionsInput struct { _ struct{} `type:"structure"` @@ -1958,6 +2415,19 @@ func (s DescribeApplicationVersionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeApplicationVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeApplicationVersionsInput"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Result message wrapping a list of application version descriptions. type DescribeApplicationVersionsOutput struct { _ struct{} `type:"structure"` @@ -2046,6 +2516,35 @@ func (s DescribeConfigurationOptionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeConfigurationOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationOptionsInput"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + if s.Options != nil { + for i, v := range s.Options { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Options", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the settings for a specified configuration set. type DescribeConfigurationOptionsOutput struct { _ struct{} `type:"structure"` @@ -2102,6 +2601,28 @@ func (s DescribeConfigurationSettingsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeConfigurationSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationSettingsInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The results from a request to change the configuration settings of an environment. type DescribeConfigurationSettingsOutput struct { _ struct{} `type:"structure"` @@ -2153,6 +2674,19 @@ func (s DescribeEnvironmentHealthInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEnvironmentHealthInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentHealthInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // See the example below for a sample response. type DescribeEnvironmentHealthOutput struct { _ struct{} `type:"structure"` @@ -2195,6 +2729,110 @@ func (s DescribeEnvironmentHealthOutput) GoString() string { return s.String() } +// Request to list completed and failed managed actions. +type DescribeEnvironmentManagedActionHistoryInput struct { + _ struct{} `type:"structure"` + + // The environment ID of the target environment. + EnvironmentId *string `type:"string"` + + // The name of the target environment. + EnvironmentName *string `min:"4" type:"string"` + + // The maximum number of items to return for a single request. + MaxItems *int64 `type:"integer"` + + // The pagination token returned by a previous request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEnvironmentManagedActionHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEnvironmentManagedActionHistoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEnvironmentManagedActionHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentManagedActionHistoryInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// A result message containing a list of completed and failed managed actions. +type DescribeEnvironmentManagedActionHistoryOutput struct { + _ struct{} `type:"structure"` + + // A list of completed and failed managed actions. + ManagedActionHistoryItems []*ManagedActionHistoryItem `min:"1" type:"list"` + + // A pagination token that you pass to DescribeEnvironmentManagedActionHistory + // to get the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEnvironmentManagedActionHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEnvironmentManagedActionHistoryOutput) GoString() string { + return s.String() +} + +// Request to list an environment's upcoming and in-progress managed actions. +type DescribeEnvironmentManagedActionsInput struct { + _ struct{} `type:"structure"` + + // The environment ID of the target environment. + EnvironmentId *string `type:"string"` + + // The name of the target environment. + EnvironmentName *string `type:"string"` + + // To show only actions with a particular status, specify a status. + Status *string `type:"string" enum:"ActionStatus"` +} + +// String returns the string representation +func (s DescribeEnvironmentManagedActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEnvironmentManagedActionsInput) GoString() string { + return s.String() +} + +// The result message containing a list of managed actions. +type DescribeEnvironmentManagedActionsOutput struct { + _ struct{} `type:"structure"` + + // A list of upcoming and in-progress managed actions. + ManagedActions []*ManagedAction `min:"1" type:"list"` +} + +// String returns the string representation +func (s DescribeEnvironmentManagedActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEnvironmentManagedActionsOutput) GoString() string { + return s.String() +} + // Request to describe the resources in an environment. type DescribeEnvironmentResourcesInput struct { _ struct{} `type:"structure"` @@ -2224,6 +2862,19 @@ func (s DescribeEnvironmentResourcesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEnvironmentResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentResourcesInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Result message containing a list of environment resource descriptions. type DescribeEnvironmentResourcesOutput struct { _ struct{} `type:"structure"` @@ -2285,6 +2936,22 @@ func (s DescribeEnvironmentsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEnvironmentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentsInput"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to retrieve a list of events for an environment. type DescribeEventsInput struct { _ struct{} `type:"structure"` @@ -2343,6 +3010,31 @@ func (s DescribeEventsInput) 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.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.MaxRecords != nil && *s.MaxRecords < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Result message wrapping a list of event descriptions. type DescribeEventsOutput struct { _ struct{} `type:"structure"` @@ -2393,6 +3085,22 @@ func (s DescribeInstancesHealthInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInstancesHealthInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInstancesHealthInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // See the example below for a sample response. type DescribeInstancesHealthOutput struct { _ struct{} `type:"structure"` @@ -2924,6 +3632,77 @@ func (s LoadBalancerDescription) GoString() string { return s.String() } +// The record of an upcoming or in-progress managed action. +type ManagedAction struct { + _ struct{} `type:"structure"` + + // A description of the managed action. + ActionDescription *string `type:"string"` + + // A unique identifier for the managed action. + ActionId *string `type:"string"` + + // The type of managed action. + ActionType *string `type:"string" enum:"ActionType"` + + // The status of the managed action. If the action is Scheduled, you can apply + // it immediately with ApplyEnvironmentManagedAction. + Status *string `type:"string" enum:"ActionStatus"` + + // The start time of the maintenance window in which the managed action will + // execute. + WindowStartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` +} + +// String returns the string representation +func (s ManagedAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ManagedAction) GoString() string { + return s.String() +} + +// The record of a completed or failed managed action. +type ManagedActionHistoryItem struct { + _ struct{} `type:"structure"` + + // A description of the managed action. + ActionDescription *string `type:"string"` + + // A unique identifier for the managed action. + ActionId *string `type:"string"` + + // The type of the managed action. + ActionType *string `type:"string" enum:"ActionType"` + + // The date and time that the action started executing. + ExecutedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // If the action failed, a description of the failure. + FailureDescription *string `type:"string"` + + // If the action failed, the type of failure. + FailureType *string `type:"string" enum:"FailureType"` + + // The date and time that the action finished executing. + FinishedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The status of the action. + Status *string `type:"string" enum:"ActionHistoryStatus"` +} + +// String returns the string representation +func (s ManagedActionHistoryItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ManagedActionHistoryItem) GoString() string { + return s.String() +} + // A regular expression representing a restriction on a string configuration // option value. type OptionRestrictionRegex struct { @@ -2971,6 +3750,19 @@ func (s OptionSpecification) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *OptionSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OptionSpecification"} + if s.ResourceName != nil && len(*s.ResourceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a queue. type Queue struct { _ struct{} `type:"structure"` @@ -3020,6 +3812,19 @@ func (s RebuildEnvironmentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebuildEnvironmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebuildEnvironmentInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RebuildEnvironmentOutput struct { _ struct{} `type:"structure"` } @@ -3073,6 +3878,22 @@ func (s RequestEnvironmentInfoInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestEnvironmentInfoInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestEnvironmentInfoInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.InfoType == nil { + invalidParams.Add(request.NewErrParamRequired("InfoType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RequestEnvironmentInfoOutput struct { _ struct{} `type:"structure"` } @@ -3115,6 +3936,19 @@ func (s RestartAppServerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestartAppServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestartAppServerInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestartAppServerOutput struct { _ struct{} `type:"structure"` } @@ -3165,6 +3999,22 @@ func (s RetrieveEnvironmentInfoInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetrieveEnvironmentInfoInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetrieveEnvironmentInfoInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.InfoType == nil { + invalidParams.Add(request.NewErrParamRequired("InfoType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Result message containing a description of the requested environment info. type RetrieveEnvironmentInfoOutput struct { _ struct{} `type:"structure"` @@ -3213,6 +4063,9 @@ type SingleInstanceHealth struct { // Represents the application metrics for a specified environment. ApplicationMetrics *ApplicationMetrics `type:"structure"` + // The availability zone in which the instance runs. + AvailabilityZone *string `type:"string"` + // Represents the causes, which provide more information about the current health // status. Causes []*string `type:"list"` @@ -3222,6 +4075,9 @@ type SingleInstanceHealth struct { // (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html). Color *string `type:"string"` + // Information about the most recent deployment to an instance. + Deployment *Deployment `type:"structure"` + // Returns the health status of the specified instance. For more information, // see Health Colors and Statuses (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html). HealthStatus *string `type:"string"` @@ -3229,6 +4085,9 @@ type SingleInstanceHealth struct { // The ID of the Amazon EC2 instance. InstanceId *string `min:"1" type:"string"` + // The instance's type. + InstanceType *string `type:"string"` + // The time at which the EC2 instance was launched. LaunchedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` @@ -3289,6 +4148,22 @@ func (s SourceConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SourceConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SourceConfiguration"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the percentage of requests over the last 10 seconds that resulted // in each type of status code response. For more information, see Status Code // Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). @@ -3365,6 +4240,22 @@ func (s SwapEnvironmentCNAMEsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SwapEnvironmentCNAMEsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SwapEnvironmentCNAMEsInput"} + if s.DestinationEnvironmentName != nil && len(*s.DestinationEnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("DestinationEnvironmentName", 4)) + } + if s.SourceEnvironmentName != nil && len(*s.SourceEnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("SourceEnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SwapEnvironmentCNAMEsOutput struct { _ struct{} `type:"structure"` } @@ -3425,6 +4316,22 @@ 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 && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to terminate an environment. type TerminateEnvironmentInput struct { _ struct{} `type:"structure"` @@ -3472,6 +4379,19 @@ func (s TerminateEnvironmentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateEnvironmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateEnvironmentInput"} + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a trigger. type Trigger struct { _ struct{} `type:"structure"` @@ -3514,6 +4434,22 @@ func (s UpdateApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateApplicationVersionInput struct { _ struct{} `type:"structure"` @@ -3543,6 +4479,28 @@ func (s UpdateApplicationVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApplicationVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationVersionInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.VersionLabel == nil { + invalidParams.Add(request.NewErrParamRequired("VersionLabel")) + } + if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result message containing the options for the specified solution stack. type UpdateConfigurationTemplateInput struct { _ struct{} `type:"structure"` @@ -3583,6 +4541,48 @@ func (s UpdateConfigurationTemplateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateConfigurationTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationTemplateInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + 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.OptionSettings != nil { + for i, v := range s.OptionSettings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OptionsToRemove != nil { + for i, v := range s.OptionsToRemove { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToRemove", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Request to update an environment. type UpdateEnvironmentInput struct { _ struct{} `type:"structure"` @@ -3659,6 +4659,51 @@ func (s UpdateEnvironmentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEnvironmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentInput"} + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + if s.VersionLabel != nil && len(*s.VersionLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionLabel", 1)) + } + if s.OptionSettings != nil { + for i, v := range s.OptionSettings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OptionsToRemove != nil { + for i, v := range s.OptionsToRemove { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToRemove", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A list of validation messages for a specified configuration template. type ValidateConfigurationSettingsInput struct { _ struct{} `type:"structure"` @@ -3691,6 +4736,41 @@ func (s ValidateConfigurationSettingsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ValidateConfigurationSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ValidateConfigurationSettingsInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.EnvironmentName != nil && len(*s.EnvironmentName) < 4 { + invalidParams.Add(request.NewErrParamMinLen("EnvironmentName", 4)) + } + if s.OptionSettings == nil { + invalidParams.Add(request.NewErrParamRequired("OptionSettings")) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + if s.OptionSettings != nil { + for i, v := range s.OptionSettings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionSettings", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Provides a list of validation messages. type ValidateConfigurationSettingsOutput struct { _ struct{} `type:"structure"` @@ -3738,6 +4818,35 @@ func (s ValidationMessage) GoString() string { return s.String() } +const ( + // @enum ActionHistoryStatus + ActionHistoryStatusCompleted = "Completed" + // @enum ActionHistoryStatus + ActionHistoryStatusFailed = "Failed" + // @enum ActionHistoryStatus + ActionHistoryStatusUnknown = "Unknown" +) + +const ( + // @enum ActionStatus + ActionStatusScheduled = "Scheduled" + // @enum ActionStatus + ActionStatusPending = "Pending" + // @enum ActionStatus + ActionStatusRunning = "Running" + // @enum ActionStatus + ActionStatusUnknown = "Unknown" +) + +const ( + // @enum ActionType + ActionTypeInstanceRefresh = "InstanceRefresh" + // @enum ActionType + ActionTypePlatformUpdate = "PlatformUpdate" + // @enum ActionType + ActionTypeUnknown = "Unknown" +) + const ( // @enum ApplicationVersionStatus ApplicationVersionStatusProcessed = "Processed" @@ -3849,6 +4958,23 @@ const ( EventSeverityFatal = "FATAL" ) +const ( + // @enum FailureType + FailureTypeUpdateCancelled = "UpdateCancelled" + // @enum FailureType + FailureTypeCancellationFailed = "CancellationFailed" + // @enum FailureType + FailureTypeRollbackFailed = "RollbackFailed" + // @enum FailureType + FailureTypeRollbackSuccessful = "RollbackSuccessful" + // @enum FailureType + FailureTypeInternalFailure = "InternalFailure" + // @enum FailureType + FailureTypeInvalidEnvironmentState = "InvalidEnvironmentState" + // @enum FailureType + FailureTypePermissionsError = "PermissionsError" +) + const ( // @enum InstancesHealthAttribute InstancesHealthAttributeHealthStatus = "HealthStatus" @@ -3865,6 +4991,12 @@ const ( // @enum InstancesHealthAttribute InstancesHealthAttributeSystem = "System" // @enum InstancesHealthAttribute + InstancesHealthAttributeDeployment = "Deployment" + // @enum InstancesHealthAttribute + InstancesHealthAttributeAvailabilityZone = "AvailabilityZone" + // @enum InstancesHealthAttribute + InstancesHealthAttributeInstanceType = "InstanceType" + // @enum InstancesHealthAttribute InstancesHealthAttributeAll = "All" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go index 2ec7ef227..5e6d4236d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go @@ -11,15 +11,11 @@ import ( "github.com/aws/aws-sdk-go/private/signer/v4" ) -// This is the AWS Elastic Beanstalk API Reference. This guide provides detailed -// information about AWS Elastic Beanstalk actions, data types, parameters, -// and errors. +// AWS Elastic Beanstalk makes it easy for you to create, deploy, and manage +// scalable, fault-tolerant applications running on the Amazon Web Services +// cloud. // -// AWS Elastic Beanstalk is a tool that makes it easy for you to create, deploy, -// and manage scalable, fault-tolerant applications running on Amazon Web Services -// cloud resources. -// -// For more information about this product, go to the AWS Elastic Beanstalk +// For more information about this product, go to the AWS Elastic Beanstalk // (http://aws.amazon.com/elasticbeanstalk/) details page. The location of the // latest AWS Elastic Beanstalk WSDL is http://elasticbeanstalk.s3.amazonaws.com/doc/2010-12-01/AWSElasticBeanstalk.wsdl // (http://elasticbeanstalk.s3.amazonaws.com/doc/2010-12-01/AWSElasticBeanstalk.wsdl). @@ -27,7 +23,7 @@ import ( // (IDE) Toolkits, and command line tools that enable you to access the API, // go to Tools for Amazon Web Services (https://aws.amazon.com/tools/). // -// Endpoints +// Endpoints // // For a list of region-specific endpoints that AWS Elastic Beanstalk supports, // go to Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index 4bd51aa3a..756a84d6f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -4,6 +4,7 @@ package elasticsearchservice import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -346,6 +347,32 @@ func (s AddTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} + if s.ARN == nil { + invalidParams.Add(request.NewErrParamRequired("ARN")) + } + if s.TagList == nil { + invalidParams.Add(request.NewErrParamRequired("TagList")) + } + if s.TagList != nil { + for i, v := range s.TagList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddTagsOutput struct { _ struct{} `type:"structure"` } @@ -431,6 +458,22 @@ func (s CreateElasticsearchDomainInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateElasticsearchDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateElasticsearchDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of a CreateElasticsearchDomain operation. Contains the status // of the newly created Elasticsearch domain. type CreateElasticsearchDomainOutput struct { @@ -469,6 +512,22 @@ func (s DeleteElasticsearchDomainInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteElasticsearchDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteElasticsearchDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of a DeleteElasticsearchDomain request. Contains the status of // the pending deletion, or no status if the domain and all of its resources // have been deleted. @@ -508,6 +567,22 @@ func (s DescribeElasticsearchDomainConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeElasticsearchDomainConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchDomainConfigInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of a DescribeElasticsearchDomainConfig request. Contains the configuration // information of the requested domain. type DescribeElasticsearchDomainConfigOutput struct { @@ -546,6 +621,22 @@ func (s DescribeElasticsearchDomainInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeElasticsearchDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of a DescribeElasticsearchDomain request. Contains the status // of the domain specified in the request. type DescribeElasticsearchDomainOutput struct { @@ -584,6 +675,19 @@ func (s DescribeElasticsearchDomainsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeElasticsearchDomainsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchDomainsInput"} + if s.DomainNames == nil { + invalidParams.Add(request.NewErrParamRequired("DomainNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of a DescribeElasticsearchDomains request. Contains the status // of the specified domains or all domains owned by the account. type DescribeElasticsearchDomainsOutput struct { @@ -881,6 +985,19 @@ func (s ListTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.ARN == nil { + invalidParams.Add(request.NewErrParamRequired("ARN")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of a ListTags operation. Contains tags for all requested Elasticsearch // domains. type ListTagsOutput struct { @@ -955,6 +1072,22 @@ func (s RemoveTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} + if s.ARN == nil { + invalidParams.Add(request.NewErrParamRequired("ARN")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveTagsOutput struct { _ struct{} `type:"structure"` } @@ -1035,6 +1168,25 @@ 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 +} + // Container for the parameters to the UpdateElasticsearchDomain operation. // Specifies the type and number of instances in the domain cluster. type UpdateElasticsearchDomainConfigInput struct { @@ -1073,6 +1225,22 @@ func (s UpdateElasticsearchDomainConfigInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateElasticsearchDomainConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateElasticsearchDomainConfigInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The result of an UpdateElasticsearchDomain request. Contains the status of // the Elasticsearch domain being updated. type UpdateElasticsearchDomainConfigOutput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index a1c7b7e60..ed4293f27 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -4,6 +4,7 @@ package elb import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -999,6 +1000,19 @@ func (s AccessLog) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AccessLog) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AccessLog"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddTagsInput struct { _ struct{} `type:"structure"` @@ -1019,6 +1033,35 @@ func (s AddTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} + if s.LoadBalancerNames == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 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 + } + return nil +} + type AddTagsOutput struct { _ struct{} `type:"structure"` } @@ -1097,6 +1140,22 @@ func (s ApplySecurityGroupsToLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplySecurityGroupsToLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplySecurityGroupsToLoadBalancerInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.SecurityGroups == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroups")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ApplySecurityGroupsToLoadBalancerOutput struct { _ struct{} `type:"structure"` @@ -1135,6 +1194,22 @@ func (s AttachLoadBalancerToSubnetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachLoadBalancerToSubnetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerToSubnetsInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachLoadBalancerToSubnetsOutput struct { _ struct{} `type:"structure"` @@ -1193,6 +1268,27 @@ func (s ConfigureHealthCheckInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfigureHealthCheckInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfigureHealthCheckInput"} + if s.HealthCheck == nil { + invalidParams.Add(request.NewErrParamRequired("HealthCheck")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.HealthCheck != nil { + if err := s.HealthCheck.Validate(); err != nil { + invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ConfigureHealthCheckOutput struct { _ struct{} `type:"structure"` @@ -1232,6 +1328,19 @@ func (s ConnectionDraining) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConnectionDraining) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConnectionDraining"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Information about the ConnectionSettings attribute. type ConnectionSettings struct { _ struct{} `type:"structure"` @@ -1251,6 +1360,22 @@ func (s ConnectionSettings) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConnectionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConnectionSettings"} + if s.IdleTimeout == nil { + invalidParams.Add(request.NewErrParamRequired("IdleTimeout")) + } + if s.IdleTimeout != nil && *s.IdleTimeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("IdleTimeout", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateAppCookieStickinessPolicyInput struct { _ struct{} `type:"structure"` @@ -1276,6 +1401,25 @@ func (s CreateAppCookieStickinessPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAppCookieStickinessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAppCookieStickinessPolicyInput"} + if s.CookieName == nil { + invalidParams.Add(request.NewErrParamRequired("CookieName")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateAppCookieStickinessPolicyOutput struct { _ struct{} `type:"structure"` } @@ -1317,6 +1461,22 @@ func (s CreateLBCookieStickinessPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLBCookieStickinessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLBCookieStickinessPolicyInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateLBCookieStickinessPolicyOutput struct { _ struct{} `type:"structure"` } @@ -1392,6 +1552,45 @@ func (s CreateLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} + if s.Listeners == nil { + invalidParams.Add(request.NewErrParamRequired("Listeners")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Listeners != nil { + for i, v := range s.Listeners { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), 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 +} + type CreateLoadBalancerListenersInput struct { _ struct{} `type:"structure"` @@ -1412,6 +1611,32 @@ func (s CreateLoadBalancerListenersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoadBalancerListenersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerListenersInput"} + if s.Listeners == nil { + invalidParams.Add(request.NewErrParamRequired("Listeners")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.Listeners != nil { + for i, v := range s.Listeners { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateLoadBalancerListenersOutput struct { _ struct{} `type:"structure"` } @@ -1470,6 +1695,25 @@ func (s CreateLoadBalancerPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoadBalancerPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerPolicyInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyTypeName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyTypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateLoadBalancerPolicyOutput struct { _ struct{} `type:"structure"` } @@ -1502,6 +1746,19 @@ func (s CrossZoneLoadBalancing) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CrossZoneLoadBalancing) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CrossZoneLoadBalancing"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLoadBalancerInput struct { _ struct{} `type:"structure"` @@ -1519,6 +1776,19 @@ func (s DeleteLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLoadBalancerListenersInput struct { _ struct{} `type:"structure"` @@ -1539,6 +1809,22 @@ func (s DeleteLoadBalancerListenersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoadBalancerListenersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerListenersInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.LoadBalancerPorts == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerPorts")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLoadBalancerListenersOutput struct { _ struct{} `type:"structure"` } @@ -1588,6 +1874,22 @@ func (s DeleteLoadBalancerPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoadBalancerPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerPolicyInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLoadBalancerPolicyOutput struct { _ struct{} `type:"structure"` } @@ -1622,6 +1924,22 @@ func (s DeregisterInstancesFromLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterInstancesFromLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterInstancesFromLoadBalancerInput"} + if s.Instances == nil { + invalidParams.Add(request.NewErrParamRequired("Instances")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterInstancesFromLoadBalancerOutput struct { _ struct{} `type:"structure"` @@ -1659,6 +1977,19 @@ func (s DescribeInstanceHealthInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInstanceHealthInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceHealthInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeInstanceHealthOutput struct { _ struct{} `type:"structure"` @@ -1693,6 +2024,19 @@ func (s DescribeLoadBalancerAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLoadBalancerAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerAttributesInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeLoadBalancerAttributesOutput struct { _ struct{} `type:"structure"` @@ -1807,6 +2151,19 @@ func (s DescribeLoadBalancersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLoadBalancersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"} + if s.PageSize != nil && *s.PageSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeLoadBalancersOutput struct { _ struct{} `type:"structure"` @@ -1845,6 +2202,22 @@ func (s DescribeTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} + if s.LoadBalancerNames == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) + } + if s.LoadBalancerNames != nil && len(s.LoadBalancerNames) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LoadBalancerNames", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeTagsOutput struct { _ struct{} `type:"structure"` @@ -1882,6 +2255,22 @@ func (s DetachLoadBalancerFromSubnetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachLoadBalancerFromSubnetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancerFromSubnetsInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachLoadBalancerFromSubnetsOutput struct { _ struct{} `type:"structure"` @@ -1919,6 +2308,22 @@ func (s DisableAvailabilityZonesForLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableAvailabilityZonesForLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableAvailabilityZonesForLoadBalancerInput"} + if s.AvailabilityZones == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZones")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableAvailabilityZonesForLoadBalancerOutput struct { _ struct{} `type:"structure"` @@ -1956,6 +2361,22 @@ func (s EnableAvailabilityZonesForLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableAvailabilityZonesForLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableAvailabilityZonesForLoadBalancerInput"} + if s.AvailabilityZones == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZones")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableAvailabilityZonesForLoadBalancerOutput struct { _ struct{} `type:"structure"` @@ -2026,6 +2447,43 @@ func (s HealthCheck) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *HealthCheck) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HealthCheck"} + if s.HealthyThreshold == nil { + invalidParams.Add(request.NewErrParamRequired("HealthyThreshold")) + } + if s.HealthyThreshold != nil && *s.HealthyThreshold < 2 { + invalidParams.Add(request.NewErrParamMinValue("HealthyThreshold", 2)) + } + if s.Interval == nil { + invalidParams.Add(request.NewErrParamRequired("Interval")) + } + if s.Interval != nil && *s.Interval < 1 { + invalidParams.Add(request.NewErrParamMinValue("Interval", 1)) + } + if s.Target == nil { + invalidParams.Add(request.NewErrParamRequired("Target")) + } + if s.Timeout == nil { + invalidParams.Add(request.NewErrParamRequired("Timeout")) + } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + if s.UnhealthyThreshold == nil { + invalidParams.Add(request.NewErrParamRequired("UnhealthyThreshold")) + } + if s.UnhealthyThreshold != nil && *s.UnhealthyThreshold < 2 { + invalidParams.Add(request.NewErrParamMinValue("UnhealthyThreshold", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The ID of a back-end instance. type Instance struct { _ struct{} `type:"structure"` @@ -2175,6 +2633,28 @@ func (s Listener) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Listener) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Listener"} + if s.InstancePort == nil { + invalidParams.Add(request.NewErrParamRequired("InstancePort")) + } + if s.InstancePort != nil && *s.InstancePort < 1 { + invalidParams.Add(request.NewErrParamMinValue("InstancePort", 1)) + } + if s.LoadBalancerPort == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The policies enabled for a listener. type ListenerDescription struct { _ struct{} `type:"structure"` @@ -2249,6 +2729,36 @@ func (s LoadBalancerAttributes) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoadBalancerAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoadBalancerAttributes"} + if s.AccessLog != nil { + if err := s.AccessLog.Validate(); err != nil { + invalidParams.AddNested("AccessLog", err.(request.ErrInvalidParams)) + } + } + if s.ConnectionDraining != nil { + if err := s.ConnectionDraining.Validate(); err != nil { + invalidParams.AddNested("ConnectionDraining", err.(request.ErrInvalidParams)) + } + } + if s.ConnectionSettings != nil { + if err := s.ConnectionSettings.Validate(); err != nil { + invalidParams.AddNested("ConnectionSettings", err.(request.ErrInvalidParams)) + } + } + if s.CrossZoneLoadBalancing != nil { + if err := s.CrossZoneLoadBalancing.Validate(); err != nil { + invalidParams.AddNested("CrossZoneLoadBalancing", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Information about a load balancer. type LoadBalancerDescription struct { _ struct{} `type:"structure"` @@ -2346,6 +2856,27 @@ func (s ModifyLoadBalancerAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyLoadBalancerAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyLoadBalancerAttributesInput"} + if s.LoadBalancerAttributes == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerAttributes")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.LoadBalancerAttributes != nil { + if err := s.LoadBalancerAttributes.Validate(); err != nil { + invalidParams.AddNested("LoadBalancerAttributes", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyLoadBalancerAttributesOutput struct { _ struct{} `type:"structure"` @@ -2537,6 +3068,22 @@ func (s RegisterInstancesWithLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterInstancesWithLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterInstancesWithLoadBalancerInput"} + if s.Instances == nil { + invalidParams.Add(request.NewErrParamRequired("Instances")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterInstancesWithLoadBalancerOutput struct { _ struct{} `type:"structure"` @@ -2575,6 +3122,35 @@ func (s RemoveTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} + if s.LoadBalancerNames == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 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 + } + return nil +} + type RemoveTagsOutput struct { _ struct{} `type:"structure"` } @@ -2612,6 +3188,25 @@ func (s SetLoadBalancerListenerSSLCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetLoadBalancerListenerSSLCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerListenerSSLCertificateInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.LoadBalancerPort == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) + } + if s.SSLCertificateId == nil { + invalidParams.Add(request.NewErrParamRequired("SSLCertificateId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetLoadBalancerListenerSSLCertificateOutput struct { _ struct{} `type:"structure"` } @@ -2650,6 +3245,25 @@ func (s SetLoadBalancerPoliciesForBackendServerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetLoadBalancerPoliciesForBackendServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerPoliciesForBackendServerInput"} + if s.InstancePort == nil { + invalidParams.Add(request.NewErrParamRequired("InstancePort")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.PolicyNames == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetLoadBalancerPoliciesForBackendServerOutput struct { _ struct{} `type:"structure"` } @@ -2688,6 +3302,25 @@ func (s SetLoadBalancerPoliciesOfListenerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetLoadBalancerPoliciesOfListenerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerPoliciesOfListenerInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.LoadBalancerPort == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) + } + if s.PolicyNames == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetLoadBalancerPoliciesOfListenerOutput struct { _ struct{} `type:"structure"` } @@ -2744,6 +3377,22 @@ 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 invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The tags associated with a load balancer. type TagDescription struct { _ struct{} `type:"structure"` @@ -2782,3 +3431,16 @@ func (s TagKeyOnly) String() string { func (s TagKeyOnly) GoString() string { return s.String() } + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagKeyOnly) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagKeyOnly"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index 5600f7ab7..ddead2447 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -4,6 +4,7 @@ package firehose import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -43,38 +44,38 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // AWS accounts or different regions in the same AWS account can have the same // name. // -// By default, you can create up to 5 delivery streams per region. +// By default, you can create up to 20 delivery streams per region. // // A delivery stream can only be configured with a single destination, Amazon // S3 or Amazon Redshift. For correct CreateDeliveryStream request syntax, specify -// only one destination configuration parameter: either RedshiftDestinationConfiguration -// or S3DestinationConfiguration +// only one destination configuration parameter: either ElasticsearchDestinationConfiguration, +// RedshiftDestinationConfiguration or S3DestinationConfiguration // // As part of S3DestinationConfiguration, optional values BufferingHints, EncryptionConfiguration, // and CompressionFormat can be provided. By default, if no BufferingHints value -// is provided, Amazon Kinesis Firehose buffers data up to 5 MB or for 5 minutes, -// whichever condition is satisfied first. Note that BufferingHints is a hint, -// so there are some cases where the service cannot adhere to these conditions -// strictly; for example, record boundaries are such that the size is a little -// over or under the configured buffering size. By default, no encryption is -// performed. We strongly recommend that you enable encryption to ensure secure -// data storage in Amazon S3. +// is provided, Firehose buffers data up to 5 MB or for 5 minutes, whichever +// condition is satisfied first. Note that BufferingHints is a hint, so there +// are some cases where the service cannot adhere to these conditions strictly; +// for example, record boundaries are such that the size is a little over or +// under the configured buffering size. By default, no encryption is performed. +// We strongly recommend that you enable encryption to ensure secure data storage +// in Amazon S3. // // A few notes about RedshiftDestinationConfiguration: // // An Amazon Redshift destination requires an S3 bucket as intermediate location, -// as Amazon Kinesis Firehose first delivers data to S3 and then uses COPY syntax -// to load data into an Amazon Redshift table. This is specified in the RedshiftDestinationConfiguration.S3Configuration +// as Firehose first delivers data to S3 and then uses COPY syntax to load data +// into an Amazon Redshift table. This is specified in the RedshiftDestinationConfiguration.S3Configuration // parameter element. The compression formats SNAPPY or ZIP cannot be specified // in RedshiftDestinationConfiguration.S3Configuration because the Amazon Redshift // COPY operation that reads from the S3 bucket doesn't support these compression // formats. We strongly recommend that the username and password provided is -// used exclusively for Amazon Kinesis Firehose purposes, and that the permissions -// for the account are restricted for Amazon Redshift INSERT permissions. Amazon -// Kinesis Firehose assumes the IAM role that is configured as part of destinations. -// The IAM role should allow the Amazon Kinesis Firehose principal to assume -// the role, and the role should have permissions that allows the service to -// deliver the data. For more information, see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) +// used exclusively for Firehose purposes, and that the permissions for the +// account are restricted for Amazon Redshift INSERT permissions. Firehose +// assumes the IAM role that is configured as part of destinations. The IAM +// role should allow the Firehose principal to assume the role, and the role +// should have permissions that allows the service to deliver the data. For +// more information, see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) // in the Amazon Kinesis Firehose Developer Guide. func (c *Firehose) CreateDeliveryStream(input *CreateDeliveryStreamInput) (*CreateDeliveryStreamOutput, error) { req, out := c.CreateDeliveryStreamRequest(input) @@ -220,15 +221,11 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // 1,000 KB in size, and any kind of data, for example, a segment from a log // file, geographic location data, web site clickstream data, etc. // -// Amazon Kinesis Firehose buffers records before delivering them to the destination. -// To disambiguate the data blobs at the destination, a common solution is to -// use delimiters in the data, such as a newline (\n) or some other character -// unique within the data. This allows the consumer application(s) to parse -// individual data items when reading the data from the destination. -// -// Amazon Kinesis Firehose does not maintain data record ordering. If the destination -// data needs to be re-ordered by the consumer application, the producer should -// include some form of sequence number in each data record. +// Firehose buffers records before delivering them to the destination. To disambiguate +// the data blobs at the destination, a common solution is to use delimiters +// in the data, such as a newline (\n) or some other character unique within +// the data. This allows the consumer application(s) to parse individual data +// items when reading the data from the destination. // // The PutRecord operation returns a RecordId, which is a unique string assigned // to each record. Producer applications can use this ID for purposes such as @@ -238,10 +235,10 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // and retry. If the exception persists, it is possible that the throughput // limits have been exceeded for the delivery stream. // -// Data records sent to Amazon Kinesis Firehose are stored for 24 hours from -// the time they are added to a delivery stream as it attempts to send the records -// to the destination. If the destination is unreachable for more than 24 hours, -// the data is no longer available. +// Data records sent to Firehose are stored for 24 hours from the time they +// are added to a delivery stream as it attempts to send the records to the +// destination. If the destination is unreachable for more than 24 hours, the +// data is no longer available. func (c *Firehose) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) { req, out := c.PutRecordRequest(input) err := req.Send() @@ -287,11 +284,11 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // 1,000 KB in size, and any kind of data, for example, a segment from a log // file, geographic location data, web site clickstream data, and so on. // -// Amazon Kinesis Firehose buffers records before delivering them to the destination. -// To disambiguate the data blobs at the destination, a common solution is to -// use delimiters in the data, such as a newline (\n) or some other character -// unique within the data. This allows the consumer application(s) to parse -// individual data items when reading the data from the destination. +// Firehose buffers records before delivering them to the destination. To disambiguate +// the data blobs at the destination, a common solution is to use delimiters +// in the data, such as a newline (\n) or some other character unique within +// the data. This allows the consumer application(s) to parse individual data +// items when reading the data from the destination. // // The PutRecordBatch response includes a count of any failed records, FailedPutCount, // and an array of responses, RequestResponses. The FailedPutCount value is @@ -300,9 +297,9 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // directly correlates with a record in the request array using the same ordering, // from the top to the bottom of the request and response. RequestResponses // always includes the same number of records as the request array. RequestResponses -// both successfully and unsuccessfully processed records. Amazon Kinesis Firehose -// attempts to process all records in each PutRecordBatch request. A single -// record failure does not stop the processing of subsequent records. +// both successfully and unsuccessfully processed records. Firehose attempts +// to process all records in each PutRecordBatch request. A single record failure +// does not stop the processing of subsequent records. // // A successfully processed record includes a RecordId value, which is a unique // value identified for the record. An unsuccessfully processed record includes @@ -320,10 +317,10 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // off and retry. If the exception persists, it is possible that the throughput // limits have been exceeded for the delivery stream. // -// Data records sent to Amazon Kinesis Firehose are stored for 24 hours from -// the time they are added to a delivery stream as it attempts to send the records -// to the destination. If the destination is unreachable for more than 24 hours, -// the data is no longer available. +// Data records sent to Firehose are stored for 24 hours from the time they +// are added to a delivery stream as it attempts to send the records to the +// destination. If the destination is unreachable for more than 24 hours, the +// data is no longer available. func (c *Firehose) PutRecordBatch(input *PutRecordBatchInput) (*PutRecordBatchOutput, error) { req, out := c.PutRecordBatchRequest(input) err := req.Send() @@ -350,7 +347,10 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req return } -// Updates the specified destination of the specified delivery stream. +// Updates the specified destination of the specified delivery stream. Note: +// Switching between Elasticsearch and other services is not supported. For +// Elasticsearch destination, you can only update an existing Elasticsearch +// destination with this operation. // // This operation can be used to change the destination type (for example, // to replace the Amazon S3 destination with Amazon Redshift) or change the @@ -360,23 +360,23 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req // so data writes to the delivery stream can continue during this process. The // updated configurations are normally effective within a few minutes. // -// If the destination type is the same, Amazon Kinesis Firehose merges the -// configuration parameters specified in the UpdateDestination request with -// the destination configuration that already exists on the delivery stream. -// If any of the parameters are not specified in the update request, then the -// existing configuration parameters are retained. For example, in the Amazon -// S3 destination, if EncryptionConfiguration is not specified then the existing -// EncryptionConfiguration is maintained on the destination. +// If the destination type is the same, Firehose merges the configuration parameters +// specified in the UpdateDestination request with the destination configuration +// that already exists on the delivery stream. If any of the parameters are +// not specified in the update request, then the existing configuration parameters +// are retained. For example, in the Amazon S3 destination, if EncryptionConfiguration +// is not specified then the existing EncryptionConfiguration is maintained +// on the destination. // // If the destination type is not the same, for example, changing the destination -// from Amazon S3 to Amazon Redshift, Amazon Kinesis Firehose does not merge -// any parameters. In this case, all parameters must be specified. +// from Amazon S3 to Amazon Redshift, Firehose does not merge any parameters. +// In this case, all parameters must be specified. // -// Amazon Kinesis Firehose uses the CurrentDeliveryStreamVersionId to avoid -// race conditions and conflicting merges. This is a required field in every -// request and the service only updates the configuration if the existing configuration -// matches the VersionId. After the update is applied successfully, the VersionId -// is updated, which can be retrieved with the DescribeDeliveryStream operation. +// Firehose uses the CurrentDeliveryStreamVersionId to avoid race conditions +// and conflicting merges. This is a required field in every request and the +// service only updates the configuration if the existing configuration matches +// the VersionId. After the update is applied successfully, the VersionId is +// updated, which can be retrieved with the DescribeDeliveryStream operation. // The new VersionId should be uses to set CurrentDeliveryStreamVersionId in // the next UpdateDestination operation. func (c *Firehose) UpdateDestination(input *UpdateDestinationInput) (*UpdateDestinationOutput, error) { @@ -385,7 +385,9 @@ func (c *Firehose) UpdateDestination(input *UpdateDestinationInput) (*UpdateDest return out, err } -// Describes the buffering to perform before delivering data to the destination. +// Describes hints for the buffering to perform before delivering data to the +// destination. Please note that these options are treated as hints, and therefore +// Firehose may choose to use different values when it is optimal. type BufferingHints struct { _ struct{} `type:"structure"` @@ -412,6 +414,48 @@ func (s BufferingHints) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BufferingHints) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BufferingHints"} + if s.IntervalInSeconds != nil && *s.IntervalInSeconds < 60 { + invalidParams.Add(request.NewErrParamMinValue("IntervalInSeconds", 60)) + } + if s.SizeInMBs != nil && *s.SizeInMBs < 1 { + invalidParams.Add(request.NewErrParamMinValue("SizeInMBs", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Describes CloudWatch logging options for your delivery stream. +type CloudWatchLoggingOptions struct { + _ struct{} `type:"structure"` + + // Enables or disables CloudWatch logging. + Enabled *bool `type:"boolean"` + + // The CloudWatch group name for logging. This value is required if Enabled + // is true. + LogGroupName *string `type:"string"` + + // The CloudWatch log stream name for logging. This value is required if Enabled + // is true. + LogStreamName *string `type:"string"` +} + +// String returns the string representation +func (s CloudWatchLoggingOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchLoggingOptions) GoString() string { + return s.String() +} + // Describes a COPY command for Amazon Redshift. type CopyCommand struct { _ struct{} `type:"structure"` @@ -419,7 +463,7 @@ type CopyCommand struct { // Optional parameters to use with the Amazon Redshift COPY command. For more // information, see the "Optional Parameters" section of Amazon Redshift COPY // command (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html). Some - // possible examples that would apply to Amazon Kinesis Firehose are as follows. + // possible examples that would apply to Firehose are as follows. // // delimiter '\t' lzop; - fields are delimited with "\t" (TAB character) and // compressed using lzop. @@ -435,7 +479,7 @@ type CopyCommand struct { // JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, and the path // specified is the format of the data. // - // For more examples, see and Amazon Redshift COPY command exmaples (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY_command_examples.html). + // For more examples, see Amazon Redshift COPY command examples (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY_command_examples.html). CopyOptions *string `type:"string"` // A comma-separated list of column names. @@ -455,6 +499,22 @@ func (s CopyCommand) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyCommand) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyCommand"} + if s.DataTableName == nil { + invalidParams.Add(request.NewErrParamRequired("DataTableName")) + } + if s.DataTableName != nil && len(*s.DataTableName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DataTableName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the parameters for CreateDeliveryStream. type CreateDeliveryStreamInput struct { _ struct{} `type:"structure"` @@ -462,12 +522,18 @@ type CreateDeliveryStreamInput struct { // The name of the delivery stream. DeliveryStreamName *string `min:"1" type:"string" required:"true"` + // The destination in Amazon ES. This value cannot be specified if Amazon S3 + // or Amazon Redshift is the desired destination (see restrictions listed above). + ElasticsearchDestinationConfiguration *ElasticsearchDestinationConfiguration `type:"structure"` + // The destination in Amazon Redshift. This value cannot be specified if Amazon - // S3 is the desired destination (see restrictions listed above). + // S3 or Amazon Elasticsearch is the desired destination (see restrictions listed + // above). RedshiftDestinationConfiguration *RedshiftDestinationConfiguration `type:"structure"` - // The destination in Amazon S3. This value must be specified if RedshiftDestinationConfiguration - // is specified (see restrictions listed above). + // The destination in Amazon S3. This value must be specified if ElasticsearchDestinationConfiguration + // or RedshiftDestinationConfiguration is specified (see restrictions listed + // above). S3DestinationConfiguration *S3DestinationConfiguration `type:"structure"` } @@ -481,6 +547,37 @@ func (s CreateDeliveryStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.ElasticsearchDestinationConfiguration != nil { + if err := s.ElasticsearchDestinationConfiguration.Validate(); err != nil { + invalidParams.AddNested("ElasticsearchDestinationConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.RedshiftDestinationConfiguration != nil { + if err := s.RedshiftDestinationConfiguration.Validate(); err != nil { + invalidParams.AddNested("RedshiftDestinationConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.S3DestinationConfiguration != nil { + if err := s.S3DestinationConfiguration.Validate(); err != nil { + invalidParams.AddNested("S3DestinationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of CreateDeliveryStream. type CreateDeliveryStreamOutput struct { _ struct{} `type:"structure"` @@ -517,6 +614,22 @@ func (s DeleteDeliveryStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of DeleteDeliveryStream. type DeleteDeliveryStreamOutput struct { _ struct{} `type:"structure"` @@ -583,7 +696,7 @@ type DescribeDeliveryStreamInput struct { DeliveryStreamName *string `min:"1" type:"string" required:"true"` // Specifies the destination ID to start returning the destination information. - // Currently Amazon Kinesis Firehose supports one destination per delivery stream. + // Currently Firehose supports one destination per delivery stream. ExclusiveStartDestinationId *string `min:"1" type:"string"` // The limit on the number of destinations to return. Currently, you can have @@ -601,6 +714,28 @@ func (s DescribeDeliveryStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.ExclusiveStartDestinationId != nil && len(*s.ExclusiveStartDestinationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartDestinationId", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of DescribeDeliveryStream. type DescribeDeliveryStreamOutput struct { _ struct{} `type:"structure"` @@ -626,6 +761,9 @@ type DestinationDescription struct { // The ID of the destination. DestinationId *string `min:"1" type:"string" required:"true"` + // The destination in Amazon ES. + ElasticsearchDestinationDescription *ElasticsearchDestinationDescription `type:"structure"` + // The destination in Amazon Redshift. RedshiftDestinationDescription *RedshiftDestinationDescription `type:"structure"` @@ -643,6 +781,308 @@ func (s DestinationDescription) GoString() string { return s.String() } +// Describes the buffering to perform before delivering data to the Amazon ES +// destination. +type ElasticsearchBufferingHints struct { + _ struct{} `type:"structure"` + + // Buffer incoming data for the specified period of time, in seconds, before + // delivering it to the destination. The default value is 300 (5 minutes). + IntervalInSeconds *int64 `min:"60" type:"integer"` + + // Buffer incoming data to the specified size, in MBs, before delivering it + // to the destination. The default value is 5. + // + // We recommend setting SizeInMBs to a value greater than the amount of data + // you typically ingest into the delivery stream in 10 seconds. For example, + // if you typically ingest data at 1 MB/sec, set SizeInMBs to be 10 MB or higher. + SizeInMBs *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s ElasticsearchBufferingHints) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticsearchBufferingHints) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ElasticsearchBufferingHints) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ElasticsearchBufferingHints"} + if s.IntervalInSeconds != nil && *s.IntervalInSeconds < 60 { + invalidParams.Add(request.NewErrParamMinValue("IntervalInSeconds", 60)) + } + if s.SizeInMBs != nil && *s.SizeInMBs < 1 { + invalidParams.Add(request.NewErrParamMinValue("SizeInMBs", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Describes the configuration of a destination in Amazon ES. +type ElasticsearchDestinationConfiguration struct { + _ struct{} `type:"structure"` + + // Buffering options. If no value is specified, ElasticsearchBufferingHints + // object default values are used. + BufferingHints *ElasticsearchBufferingHints `type:"structure"` + + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + + // The ARN of the Amazon ES domain. The IAM role must have permission for DescribeElasticsearchDomain, + // DescribeElasticsearchDomains , and DescribeElasticsearchDomainConfig after + // assuming RoleARN. + DomainARN *string `min:"1" type:"string" required:"true"` + + // The Elasticsearch index name. + IndexName *string `min:"1" type:"string" required:"true"` + + // The Elasticsearch index rotation period. Index rotation appends a timestamp + // to the IndexName to facilitate expiration of old data. For more information, + // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). + // Default value is OneDay. + IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` + + // Configures retry behavior in the event that Firehose is unable to deliver + // documents to Amazon ES. Default value is 300 (5 minutes). + RetryOptions *ElasticsearchRetryOptions `type:"structure"` + + // The ARN of the IAM role to be assumed by Firehose for calling the Amazon + // ES Configuration API and for indexing documents. For more information, see + // Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + RoleARN *string `min:"1" type:"string" required:"true"` + + // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, + // Firehose writes any documents that could not be indexed to the configured + // Amazon S3 destination, with elasticsearch-failed/ appended to the key prefix. + // When set to AllDocuments, Firehose delivers all incoming records to Amazon + // S3, and also writes failed documents with elasticsearch-failed/ appended + // to the prefix. For more information, see Amazon S3 Backup for Amazon Elasticsearch + // Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup). + // Default value is FailedDocumentsOnly. + S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"` + + // Describes the configuration of a destination in Amazon S3. + S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"` + + // The Elasticsearch type name. + TypeName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ElasticsearchDestinationConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticsearchDestinationConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ElasticsearchDestinationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDestinationConfiguration"} + if s.DomainARN == nil { + invalidParams.Add(request.NewErrParamRequired("DomainARN")) + } + if s.DomainARN != nil && len(*s.DomainARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainARN", 1)) + } + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.S3Configuration == nil { + invalidParams.Add(request.NewErrParamRequired("S3Configuration")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } + if s.BufferingHints != nil { + if err := s.BufferingHints.Validate(); err != nil { + invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) + } + } + if s.S3Configuration != nil { + if err := s.S3Configuration.Validate(); err != nil { + invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// The destination description in Amazon ES. +type ElasticsearchDestinationDescription struct { + _ struct{} `type:"structure"` + + // Buffering options. + BufferingHints *ElasticsearchBufferingHints `type:"structure"` + + // CloudWatch logging options. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + + // The ARN of the Amazon ES domain. + DomainARN *string `min:"1" type:"string"` + + // The Elasticsearch index name. + IndexName *string `min:"1" type:"string"` + + // The Elasticsearch index rotation period + IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` + + // Elasticsearch retry options. + RetryOptions *ElasticsearchRetryOptions `type:"structure"` + + // The ARN of the AWS credentials. + RoleARN *string `min:"1" type:"string"` + + // Amazon S3 backup mode. + S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"` + + // Describes a destination in Amazon S3. + S3DestinationDescription *S3DestinationDescription `type:"structure"` + + // The Elasticsearch type name. + TypeName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ElasticsearchDestinationDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticsearchDestinationDescription) GoString() string { + return s.String() +} + +// Describes an update for a destination in Amazon ES. +type ElasticsearchDestinationUpdate struct { + _ struct{} `type:"structure"` + + // Buffering options. If no value is specified, ElasticsearchBufferingHints + // object default values are used. + BufferingHints *ElasticsearchBufferingHints `type:"structure"` + + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + + // The ARN of the Amazon ES domain. The IAM role must have permission for DescribeElasticsearchDomain, + // DescribeElasticsearchDomains , and DescribeElasticsearchDomainConfig after + // assuming RoleARN. + DomainARN *string `min:"1" type:"string"` + + // The Elasticsearch index name. + IndexName *string `min:"1" type:"string"` + + // The Elasticsearch index rotation period. Index rotation appends a timestamp + // to the IndexName to facilitate the expiration of old data. For more information, + // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). + // Default value is OneDay. + IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` + + // Configures retry behavior in the event that Firehose is unable to deliver + // documents to Amazon ES. Default value is 300 (5 minutes). + RetryOptions *ElasticsearchRetryOptions `type:"structure"` + + // The ARN of the IAM role to be assumed by Firehose for calling the Amazon + // ES Configuration API and for indexing documents. For more information, see + // Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + RoleARN *string `min:"1" type:"string"` + + // Describes an update for a destination in Amazon S3. + S3Update *S3DestinationUpdate `type:"structure"` + + // The Elasticsearch type name. + TypeName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ElasticsearchDestinationUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticsearchDestinationUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ElasticsearchDestinationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDestinationUpdate"} + if s.DomainARN != nil && len(*s.DomainARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainARN", 1)) + } + if s.IndexName != nil && len(*s.IndexName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } + if s.BufferingHints != nil { + if err := s.BufferingHints.Validate(); err != nil { + invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) + } + } + if s.S3Update != nil { + if err := s.S3Update.Validate(); err != nil { + invalidParams.AddNested("S3Update", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Configures retry behavior in the event that Firehose is unable to deliver +// documents to Amazon ES. +type ElasticsearchRetryOptions struct { + _ struct{} `type:"structure"` + + // After an initial failure to deliver to Amazon ES, the total amount of time + // during which Firehose re-attempts delivery. After this time has elapsed, + // the failed documents are written to Amazon S3. Default value is 300 seconds. + // A value of 0 (zero) results in no retries. + DurationInSeconds *int64 `type:"integer"` +} + +// String returns the string representation +func (s ElasticsearchRetryOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticsearchRetryOptions) GoString() string { + return s.String() +} + // Describes the encryption for a destination in Amazon S3. type EncryptionConfiguration struct { _ struct{} `type:"structure"` @@ -665,6 +1105,21 @@ func (s EncryptionConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncryptionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionConfiguration"} + if s.KMSEncryptionConfig != nil { + if err := s.KMSEncryptionConfig.Validate(); err != nil { + invalidParams.AddNested("KMSEncryptionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes an encryption key for a destination in Amazon S3. type KMSEncryptionConfig struct { _ struct{} `type:"structure"` @@ -684,6 +1139,22 @@ func (s KMSEncryptionConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *KMSEncryptionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KMSEncryptionConfig"} + if s.AWSKMSKeyARN == nil { + invalidParams.Add(request.NewErrParamRequired("AWSKMSKeyARN")) + } + if s.AWSKMSKeyARN != nil && len(*s.AWSKMSKeyARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AWSKMSKeyARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the parameters for ListDeliveryStreams. type ListDeliveryStreamsInput struct { _ struct{} `type:"structure"` @@ -705,6 +1176,22 @@ func (s ListDeliveryStreamsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeliveryStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeliveryStreamsInput"} + if s.ExclusiveStartDeliveryStreamName != nil && len(*s.ExclusiveStartDeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartDeliveryStreamName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of ListDeliveryStreams. type ListDeliveryStreamsOutput struct { _ struct{} `type:"structure"` @@ -747,6 +1234,38 @@ func (s PutRecordBatchInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRecordBatchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRecordBatchInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.Records == nil { + invalidParams.Add(request.NewErrParamRequired("Records")) + } + if s.Records != nil && len(s.Records) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Records", 1)) + } + if s.Records != nil { + for i, v := range s.Records { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of PutRecordBatch. type PutRecordBatchOutput struct { _ struct{} `type:"structure"` @@ -817,6 +1336,30 @@ func (s PutRecordInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRecordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.Record == nil { + invalidParams.Add(request.NewErrParamRequired("Record")) + } + if s.Record != nil { + if err := s.Record.Validate(); err != nil { + invalidParams.AddNested("Record", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of PutRecord. type PutRecordOutput struct { _ struct{} `type:"structure"` @@ -856,10 +1399,26 @@ func (s Record) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Record) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Record"} + if s.Data == nil { + invalidParams.Add(request.NewErrParamRequired("Data")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the configuration of a destination in Amazon Redshift. type RedshiftDestinationConfiguration struct { _ struct{} `type:"structure"` + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + // The database connection string. ClusterJDBCURL *string `min:"1" type:"string" required:"true"` @@ -894,10 +1453,63 @@ func (s RedshiftDestinationConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RedshiftDestinationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RedshiftDestinationConfiguration"} + if s.ClusterJDBCURL == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterJDBCURL")) + } + if s.ClusterJDBCURL != nil && len(*s.ClusterJDBCURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClusterJDBCURL", 1)) + } + if s.CopyCommand == nil { + invalidParams.Add(request.NewErrParamRequired("CopyCommand")) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.Password != nil && len(*s.Password) < 6 { + invalidParams.Add(request.NewErrParamMinLen("Password", 6)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.S3Configuration == nil { + invalidParams.Add(request.NewErrParamRequired("S3Configuration")) + } + if s.Username == nil { + invalidParams.Add(request.NewErrParamRequired("Username")) + } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } + if s.CopyCommand != nil { + if err := s.CopyCommand.Validate(); err != nil { + invalidParams.AddNested("CopyCommand", err.(request.ErrInvalidParams)) + } + } + if s.S3Configuration != nil { + if err := s.S3Configuration.Validate(); err != nil { + invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a destination in Amazon Redshift. type RedshiftDestinationDescription struct { _ struct{} `type:"structure"` + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + // The database connection string. ClusterJDBCURL *string `min:"1" type:"string" required:"true"` @@ -928,6 +1540,9 @@ func (s RedshiftDestinationDescription) GoString() string { type RedshiftDestinationUpdate struct { _ struct{} `type:"structure"` + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + // The database connection string. ClusterJDBCURL *string `min:"1" type:"string"` @@ -961,6 +1576,38 @@ func (s RedshiftDestinationUpdate) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RedshiftDestinationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RedshiftDestinationUpdate"} + if s.ClusterJDBCURL != nil && len(*s.ClusterJDBCURL) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClusterJDBCURL", 1)) + } + if s.Password != nil && len(*s.Password) < 6 { + invalidParams.Add(request.NewErrParamMinLen("Password", 6)) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } + if s.CopyCommand != nil { + if err := s.CopyCommand.Validate(); err != nil { + invalidParams.AddNested("CopyCommand", err.(request.ErrInvalidParams)) + } + } + if s.S3Update != nil { + if err := s.S3Update.Validate(); err != nil { + invalidParams.AddNested("S3Update", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the configuration of a destination in Amazon S3. type S3DestinationConfiguration struct { _ struct{} `type:"structure"` @@ -972,6 +1619,9 @@ type S3DestinationConfiguration struct { // values are used. BufferingHints *BufferingHints `type:"structure"` + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + // The compression format. If no value is specified, the default is UNCOMPRESSED. // // The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift @@ -1005,6 +1655,38 @@ func (s S3DestinationConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3DestinationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3DestinationConfiguration"} + if s.BucketARN == nil { + invalidParams.Add(request.NewErrParamRequired("BucketARN")) + } + if s.BucketARN != nil && len(*s.BucketARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.BufferingHints != nil { + if err := s.BufferingHints.Validate(); err != nil { + invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) + } + } + if s.EncryptionConfiguration != nil { + if err := s.EncryptionConfiguration.Validate(); err != nil { + invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a destination in Amazon S3. type S3DestinationDescription struct { _ struct{} `type:"structure"` @@ -1016,6 +1698,9 @@ type S3DestinationDescription struct { // values are used. BufferingHints *BufferingHints `type:"structure" required:"true"` + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + // The compression format. If no value is specified, the default is NOCOMPRESSION. CompressionFormat *string `type:"string" required:"true" enum:"CompressionFormat"` @@ -1056,6 +1741,9 @@ type S3DestinationUpdate struct { // values are used. BufferingHints *BufferingHints `type:"structure"` + // Describes CloudWatch logging options for your delivery stream. + CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` + // The compression format. If no value is specified, the default is NOCOMPRESSION. // // The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift @@ -1089,6 +1777,32 @@ func (s S3DestinationUpdate) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3DestinationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3DestinationUpdate"} + if s.BucketARN != nil && len(*s.BucketARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.BufferingHints != nil { + if err := s.BufferingHints.Validate(); err != nil { + invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) + } + } + if s.EncryptionConfiguration != nil { + if err := s.EncryptionConfiguration.Validate(); err != nil { + invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the parameters for UpdateDestination. type UpdateDestinationInput struct { _ struct{} `type:"structure"` @@ -1107,6 +1821,9 @@ type UpdateDestinationInput struct { // The ID of the destination. DestinationId *string `min:"1" type:"string" required:"true"` + // Describes an update for a destination in Amazon ES. + ElasticsearchDestinationUpdate *ElasticsearchDestinationUpdate `type:"structure"` + // Describes an update for a destination in Amazon Redshift. RedshiftDestinationUpdate *RedshiftDestinationUpdate `type:"structure"` @@ -1124,6 +1841,49 @@ func (s UpdateDestinationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDestinationInput"} + if s.CurrentDeliveryStreamVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentDeliveryStreamVersionId")) + } + if s.CurrentDeliveryStreamVersionId != nil && len(*s.CurrentDeliveryStreamVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CurrentDeliveryStreamVersionId", 1)) + } + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.DestinationId == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationId")) + } + if s.DestinationId != nil && len(*s.DestinationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationId", 1)) + } + if s.ElasticsearchDestinationUpdate != nil { + if err := s.ElasticsearchDestinationUpdate.Validate(); err != nil { + invalidParams.AddNested("ElasticsearchDestinationUpdate", err.(request.ErrInvalidParams)) + } + } + if s.RedshiftDestinationUpdate != nil { + if err := s.RedshiftDestinationUpdate.Validate(); err != nil { + invalidParams.AddNested("RedshiftDestinationUpdate", err.(request.ErrInvalidParams)) + } + } + if s.S3DestinationUpdate != nil { + if err := s.S3DestinationUpdate.Validate(); err != nil { + invalidParams.AddNested("S3DestinationUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output of UpdateDestination. type UpdateDestinationOutput struct { _ struct{} `type:"structure"` @@ -1159,6 +1919,26 @@ const ( DeliveryStreamStatusActive = "ACTIVE" ) +const ( + // @enum ElasticsearchIndexRotationPeriod + ElasticsearchIndexRotationPeriodNoRotation = "NoRotation" + // @enum ElasticsearchIndexRotationPeriod + ElasticsearchIndexRotationPeriodOneHour = "OneHour" + // @enum ElasticsearchIndexRotationPeriod + ElasticsearchIndexRotationPeriodOneDay = "OneDay" + // @enum ElasticsearchIndexRotationPeriod + ElasticsearchIndexRotationPeriodOneWeek = "OneWeek" + // @enum ElasticsearchIndexRotationPeriod + ElasticsearchIndexRotationPeriodOneMonth = "OneMonth" +) + +const ( + // @enum ElasticsearchS3BackupMode + ElasticsearchS3BackupModeFailedDocumentsOnly = "FailedDocumentsOnly" + // @enum ElasticsearchS3BackupMode + ElasticsearchS3BackupModeAllDocuments = "AllDocuments" +) + const ( // @enum NoEncryptionConfig NoEncryptionConfigNoEncryption = "NoEncryption" diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go index 78f5bed90..fcb419882 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go @@ -12,7 +12,8 @@ import ( ) // Amazon Kinesis Firehose is a fully-managed service that delivers real-time -// streaming data to destinations such as Amazon S3 and Amazon Redshift. +// streaming data to destinations such as Amazon Simple Storage Service (Amazon +// S3), Amazon Elasticsearch Service (Amazon ES), and Amazon Redshift. //The service client's operations are safe to be used concurrently. // It is not safe to mutate any of the client's properties though. type Firehose struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go index 692bcc29f..dedf76f42 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go @@ -1682,6 +1682,25 @@ func (s AbortMultipartUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AbortMultipartUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AbortMultipartUploadOutput struct { _ struct{} `type:"structure"` } @@ -1722,6 +1741,22 @@ func (s AbortVaultLockInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AbortVaultLockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AbortVaultLockInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AbortVaultLockOutput struct { _ struct{} `type:"structure"` } @@ -1765,6 +1800,22 @@ func (s AddTagsToVaultInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToVaultInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddTagsToVaultOutput struct { _ struct{} `type:"structure"` } @@ -1849,6 +1900,25 @@ func (s CompleteMultipartUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompleteMultipartUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The input values for CompleteVaultLock. type CompleteVaultLockInput struct { _ struct{} `type:"structure"` @@ -1878,6 +1948,25 @@ func (s CompleteVaultLockInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompleteVaultLockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompleteVaultLockInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.LockId == nil { + invalidParams.Add(request.NewErrParamRequired("LockId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CompleteVaultLockOutput struct { _ struct{} `type:"structure"` } @@ -1918,6 +2007,22 @@ func (s CreateVaultInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVaultInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type CreateVaultOutput struct { _ struct{} `type:"structure"` @@ -2010,6 +2115,25 @@ func (s DeleteArchiveInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteArchiveInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteArchiveInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.ArchiveId == nil { + invalidParams.Add(request.NewErrParamRequired("ArchiveId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteArchiveOutput struct { _ struct{} `type:"structure"` } @@ -2049,6 +2173,22 @@ func (s DeleteVaultAccessPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVaultAccessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVaultAccessPolicyInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVaultAccessPolicyOutput struct { _ struct{} `type:"structure"` } @@ -2088,6 +2228,22 @@ func (s DeleteVaultInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVaultInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Provides options for deleting a vault notification configuration from an // Amazon Glacier vault. type DeleteVaultNotificationsInput struct { @@ -2114,6 +2270,22 @@ func (s DeleteVaultNotificationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVaultNotificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVaultNotificationsInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVaultNotificationsOutput struct { _ struct{} `type:"structure"` } @@ -2170,6 +2342,25 @@ func (s DescribeJobInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeJobInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Provides options for retrieving metadata for a specific vault in Amazon Glacier. type DescribeVaultInput struct { _ struct{} `type:"structure"` @@ -2195,6 +2386,22 @@ func (s DescribeVaultInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVaultInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type DescribeVaultOutput struct { _ struct{} `type:"structure"` @@ -2257,6 +2464,19 @@ func (s GetDataRetrievalPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDataRetrievalPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDataRetrievalPolicyInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to the GetDataRetrievalPolicy request. type GetDataRetrievalPolicyOutput struct { _ struct{} `type:"structure"` @@ -2308,6 +2528,25 @@ func (s GetJobOutputInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetJobOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetJobOutputInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type GetJobOutputOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -2386,6 +2625,22 @@ func (s GetVaultAccessPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVaultAccessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVaultAccessPolicyInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Output for GetVaultAccessPolicy. type GetVaultAccessPolicyOutput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -2429,6 +2684,22 @@ func (s GetVaultLockInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVaultLockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVaultLockInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type GetVaultLockOutput struct { _ struct{} `type:"structure"` @@ -2484,6 +2755,22 @@ func (s GetVaultNotificationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVaultNotificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVaultNotificationsInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type GetVaultNotificationsOutput struct { _ struct{} `type:"structure" payload:"VaultNotificationConfig"` @@ -2530,6 +2817,22 @@ func (s InitiateJobInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InitiateJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InitiateJobInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type InitiateJobOutput struct { _ struct{} `type:"structure"` @@ -2588,6 +2891,22 @@ func (s InitiateMultipartUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InitiateMultipartUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InitiateMultipartUploadInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The Amazon Glacier response to your request. type InitiateMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -2639,6 +2958,22 @@ func (s InitiateVaultLockInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InitiateVaultLockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InitiateVaultLockInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type InitiateVaultLockOutput struct { _ struct{} `type:"structure"` @@ -2924,6 +3259,22 @@ func (s ListJobsInput) 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.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type ListJobsOutput struct { _ struct{} `type:"structure"` @@ -2984,6 +3335,22 @@ func (s ListMultipartUploadsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMultipartUploadsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type ListMultipartUploadsOutput struct { _ struct{} `type:"structure"` @@ -3047,6 +3414,25 @@ func (s ListPartsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPartsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type ListPartsOutput struct { _ struct{} `type:"structure"` @@ -3112,6 +3498,22 @@ func (s ListTagsForVaultInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForVaultInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type ListTagsForVaultOutput struct { _ struct{} `type:"structure"` @@ -3162,6 +3564,19 @@ func (s ListVaultsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVaultsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVaultsInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type ListVaultsOutput struct { _ struct{} `type:"structure"` @@ -3234,6 +3649,22 @@ func (s RemoveTagsFromVaultInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsFromVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromVaultInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveTagsFromVaultOutput struct { _ struct{} `type:"structure"` } @@ -3274,6 +3705,19 @@ func (s SetDataRetrievalPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetDataRetrievalPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetDataRetrievalPolicyInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetDataRetrievalPolicyOutput struct { _ struct{} `type:"structure"` } @@ -3316,6 +3760,22 @@ func (s SetVaultAccessPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetVaultAccessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetVaultAccessPolicyInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetVaultAccessPolicyOutput struct { _ struct{} `type:"structure"` } @@ -3359,6 +3819,22 @@ func (s SetVaultNotificationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetVaultNotificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetVaultNotificationsInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetVaultNotificationsOutput struct { _ struct{} `type:"structure"` } @@ -3407,6 +3883,22 @@ func (s UploadArchiveInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadArchiveInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadArchiveInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A list of in-progress multipart uploads for a vault. type UploadListElement struct { _ struct{} `type:"structure"` @@ -3480,6 +3972,25 @@ func (s UploadMultipartPartInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadMultipartPartInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadMultipartPartInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + if s.VaultName == nil { + invalidParams.Add(request.NewErrParamRequired("VaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the Amazon Glacier response to your request. type UploadMultipartPartOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go index fd5701724..613606019 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/customizations.go @@ -37,20 +37,16 @@ func addAccountID(r *request.Request) { } func addChecksum(r *request.Request) { - if r.Body == nil { + if r.Body == nil || r.HTTPRequest.Header.Get("X-Amz-Sha256-Tree-Hash") != "" { return } h := ComputeHashes(r.Body) + hstr := hex.EncodeToString(h.TreeHash) + r.HTTPRequest.Header.Set("X-Amz-Sha256-Tree-Hash", hstr) - if r.HTTPRequest.Header.Get("X-Amz-Content-Sha256") == "" { - hstr := hex.EncodeToString(h.LinearHash) - r.HTTPRequest.Header.Set("X-Amz-Content-Sha256", hstr) - } - if r.HTTPRequest.Header.Get("X-Amz-Sha256-Tree-Hash") == "" { - hstr := hex.EncodeToString(h.TreeHash) - r.HTTPRequest.Header.Set("X-Amz-Sha256-Tree-Hash", hstr) - } + hLstr := hex.EncodeToString(h.LinearHash) + r.HTTPRequest.Header.Set("X-Amz-Content-Sha256", hLstr) } func addAPIVersion(r *request.Request) { diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 824361531..0a1b93adc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -4,6 +4,7 @@ package iam import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -4452,6 +4453,28 @@ func (s AddClientIDToOpenIDConnectProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddClientIDToOpenIDConnectProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddClientIDToOpenIDConnectProviderInput"} + if s.ClientID == nil { + invalidParams.Add(request.NewErrParamRequired("ClientID")) + } + if s.ClientID != nil && len(*s.ClientID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientID", 1)) + } + if s.OpenIDConnectProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddClientIDToOpenIDConnectProviderOutput struct { _ struct{} `type:"structure"` } @@ -4486,6 +4509,28 @@ func (s AddRoleToInstanceProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddRoleToInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddRoleToInstanceProfileInput"} + if s.InstanceProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) + } + if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddRoleToInstanceProfileOutput struct { _ struct{} `type:"structure"` } @@ -4520,6 +4565,28 @@ func (s AddUserToGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddUserToGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddUserToGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddUserToGroupOutput struct { _ struct{} `type:"structure"` } @@ -4558,6 +4625,28 @@ func (s AttachGroupPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachGroupPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachGroupPolicyInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachGroupPolicyOutput struct { _ struct{} `type:"structure"` } @@ -4596,6 +4685,28 @@ func (s AttachRolePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachRolePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachRolePolicyInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachRolePolicyOutput struct { _ struct{} `type:"structure"` } @@ -4634,6 +4745,28 @@ func (s AttachUserPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachUserPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachUserPolicyInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachUserPolicyOutput struct { _ struct{} `type:"structure"` } @@ -4703,6 +4836,28 @@ func (s ChangePasswordInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChangePasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChangePasswordInput"} + if s.NewPassword == nil { + invalidParams.Add(request.NewErrParamRequired("NewPassword")) + } + if s.NewPassword != nil && len(*s.NewPassword) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewPassword", 1)) + } + if s.OldPassword == nil { + invalidParams.Add(request.NewErrParamRequired("OldPassword")) + } + if s.OldPassword != nil && len(*s.OldPassword) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OldPassword", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ChangePasswordOutput struct { _ struct{} `type:"structure"` } @@ -4750,6 +4905,19 @@ func (s ContextEntry) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContextEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContextEntry"} + if s.ContextKeyName != nil && len(*s.ContextKeyName) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ContextKeyName", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateAccessKeyInput struct { _ struct{} `type:"structure"` @@ -4767,6 +4935,19 @@ func (s CreateAccessKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAccessKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAccessKeyInput"} + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateAccessKey request. type CreateAccessKeyOutput struct { _ struct{} `type:"structure"` @@ -4802,6 +4983,22 @@ func (s CreateAccountAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAccountAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAccountAliasInput"} + if s.AccountAlias == nil { + invalidParams.Add(request.NewErrParamRequired("AccountAlias")) + } + if s.AccountAlias != nil && len(*s.AccountAlias) < 3 { + invalidParams.Add(request.NewErrParamMinLen("AccountAlias", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateAccountAliasOutput struct { _ struct{} `type:"structure"` } @@ -4841,6 +5038,25 @@ func (s CreateGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateGroup request. type CreateGroupOutput struct { _ struct{} `type:"structure"` @@ -4884,6 +5100,25 @@ func (s CreateInstanceProfileInput) 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"} + if s.InstanceProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) + } + if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateInstanceProfile request. type CreateInstanceProfileOutput struct { _ struct{} `type:"structure"` @@ -4925,6 +5160,28 @@ func (s CreateLoginProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoginProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoginProfileInput"} + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.Password != nil && len(*s.Password) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Password", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateLoginProfile request. type CreateLoginProfileOutput struct { _ struct{} `type:"structure"` @@ -5002,6 +5259,25 @@ func (s CreateOpenIDConnectProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateOpenIDConnectProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateOpenIDConnectProviderInput"} + if s.ThumbprintList == nil { + invalidParams.Add(request.NewErrParamRequired("ThumbprintList")) + } + if s.Url == nil { + invalidParams.Add(request.NewErrParamRequired("Url")) + } + if s.Url != nil && len(*s.Url) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Url", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateOpenIDConnectProvider request. type CreateOpenIDConnectProviderOutput struct { _ struct{} `type:"structure"` @@ -5059,6 +5335,28 @@ func (s CreatePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePolicyInput"} + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + } + if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreatePolicy request. type CreatePolicyOutput struct { _ struct{} `type:"structure"` @@ -5112,6 +5410,28 @@ func (s CreatePolicyVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePolicyVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePolicyVersionInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + } + if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreatePolicyVersion request. type CreatePolicyVersionOutput struct { _ struct{} `type:"structure"` @@ -5159,6 +5479,31 @@ func (s CreateRoleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRoleInput"} + if s.AssumeRolePolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("AssumeRolePolicyDocument")) + } + if s.AssumeRolePolicyDocument != nil && len(*s.AssumeRolePolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssumeRolePolicyDocument", 1)) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateRole request. type CreateRoleOutput struct { _ struct{} `type:"structure"` @@ -5204,6 +5549,28 @@ func (s CreateSAMLProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSAMLProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSAMLProviderInput"} + 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.SAMLMetadataDocument == nil { + invalidParams.Add(request.NewErrParamRequired("SAMLMetadataDocument")) + } + if s.SAMLMetadataDocument != nil && len(*s.SAMLMetadataDocument) < 1000 { + invalidParams.Add(request.NewErrParamMinLen("SAMLMetadataDocument", 1000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateSAMLProvider request. type CreateSAMLProviderOutput struct { _ struct{} `type:"structure"` @@ -5247,6 +5614,25 @@ func (s CreateUserInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateUser request. type CreateUserOutput struct { _ struct{} `type:"structure"` @@ -5291,6 +5677,25 @@ func (s CreateVirtualMFADeviceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVirtualMFADeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVirtualMFADeviceInput"} + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + if s.VirtualMFADeviceName == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualMFADeviceName")) + } + if s.VirtualMFADeviceName != nil && len(*s.VirtualMFADeviceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VirtualMFADeviceName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful CreateVirtualMFADevice request. type CreateVirtualMFADeviceOutput struct { _ struct{} `type:"structure"` @@ -5330,6 +5735,28 @@ func (s DeactivateMFADeviceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeactivateMFADeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeactivateMFADeviceInput"} + if s.SerialNumber == nil { + invalidParams.Add(request.NewErrParamRequired("SerialNumber")) + } + if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { + invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeactivateMFADeviceOutput struct { _ struct{} `type:"structure"` } @@ -5365,6 +5792,25 @@ func (s DeleteAccessKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAccessKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAccessKeyInput"} + if s.AccessKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) + } + if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { + invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAccessKeyOutput struct { _ struct{} `type:"structure"` } @@ -5396,6 +5842,22 @@ func (s DeleteAccountAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAccountAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAccountAliasInput"} + if s.AccountAlias == nil { + invalidParams.Add(request.NewErrParamRequired("AccountAlias")) + } + if s.AccountAlias != nil && len(*s.AccountAlias) < 3 { + invalidParams.Add(request.NewErrParamMinLen("AccountAlias", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAccountAliasOutput struct { _ struct{} `type:"structure"` } @@ -5455,6 +5917,22 @@ func (s DeleteGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteGroupOutput struct { _ struct{} `type:"structure"` } @@ -5490,6 +5968,28 @@ func (s DeleteGroupPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGroupPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGroupPolicyInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteGroupPolicyOutput struct { _ struct{} `type:"structure"` } @@ -5521,6 +6021,22 @@ func (s DeleteInstanceProfileInput) GoString() string { return s.String() } +// 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.InstanceProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) + } + if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteInstanceProfileOutput struct { _ struct{} `type:"structure"` } @@ -5552,6 +6068,22 @@ func (s DeleteLoginProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoginProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoginProfileInput"} + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLoginProfileOutput struct { _ struct{} `type:"structure"` } @@ -5585,6 +6117,22 @@ func (s DeleteOpenIDConnectProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteOpenIDConnectProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteOpenIDConnectProviderInput"} + if s.OpenIDConnectProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteOpenIDConnectProviderOutput struct { _ struct{} `type:"structure"` } @@ -5620,6 +6168,22 @@ func (s DeletePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeletePolicyOutput struct { _ struct{} `type:"structure"` } @@ -5662,6 +6226,25 @@ func (s DeletePolicyVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePolicyVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePolicyVersionInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.VersionId == nil { + invalidParams.Add(request.NewErrParamRequired("VersionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeletePolicyVersionOutput struct { _ struct{} `type:"structure"` } @@ -5693,6 +6276,22 @@ func (s DeleteRoleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRoleOutput struct { _ struct{} `type:"structure"` } @@ -5728,6 +6327,28 @@ func (s DeleteRolePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRolePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRolePolicyInput"} + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteRolePolicyOutput struct { _ struct{} `type:"structure"` } @@ -5759,6 +6380,22 @@ func (s DeleteSAMLProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSAMLProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSAMLProviderInput"} + if s.SAMLProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) + } + if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSAMLProviderOutput struct { _ struct{} `type:"structure"` } @@ -5793,6 +6430,28 @@ func (s DeleteSSHPublicKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSSHPublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSSHPublicKeyInput"} + if s.SSHPublicKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) + } + if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { + invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSSHPublicKeyOutput struct { _ struct{} `type:"structure"` } @@ -5824,6 +6483,22 @@ func (s DeleteServerCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServerCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServerCertificateInput"} + if s.ServerCertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) + } + if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteServerCertificateOutput struct { _ struct{} `type:"structure"` } @@ -5858,6 +6533,25 @@ func (s DeleteSigningCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSigningCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSigningCertificateInput"} + if s.CertificateId == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateId")) + } + if s.CertificateId != nil && len(*s.CertificateId) < 24 { + invalidParams.Add(request.NewErrParamMinLen("CertificateId", 24)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSigningCertificateOutput struct { _ struct{} `type:"structure"` } @@ -5889,6 +6583,22 @@ func (s DeleteUserInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteUserOutput struct { _ struct{} `type:"structure"` } @@ -5924,6 +6634,28 @@ func (s DeleteUserPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserPolicyInput"} + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteUserPolicyOutput struct { _ struct{} `type:"structure"` } @@ -5956,6 +6688,22 @@ func (s DeleteVirtualMFADeviceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVirtualMFADeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualMFADeviceInput"} + if s.SerialNumber == nil { + invalidParams.Add(request.NewErrParamRequired("SerialNumber")) + } + if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { + invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteVirtualMFADeviceOutput struct { _ struct{} `type:"structure"` } @@ -5994,6 +6742,28 @@ func (s DetachGroupPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachGroupPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachGroupPolicyInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachGroupPolicyOutput struct { _ struct{} `type:"structure"` } @@ -6032,6 +6802,28 @@ func (s DetachRolePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachRolePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachRolePolicyInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachRolePolicyOutput struct { _ struct{} `type:"structure"` } @@ -6070,6 +6862,28 @@ func (s DetachUserPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachUserPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachUserPolicyInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachUserPolicyOutput struct { _ struct{} `type:"structure"` } @@ -6111,6 +6925,40 @@ func (s EnableMFADeviceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableMFADeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableMFADeviceInput"} + if s.AuthenticationCode1 == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationCode1")) + } + if s.AuthenticationCode1 != nil && len(*s.AuthenticationCode1) < 6 { + invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode1", 6)) + } + if s.AuthenticationCode2 == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationCode2")) + } + if s.AuthenticationCode2 != nil && len(*s.AuthenticationCode2) < 6 { + invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode2", 6)) + } + if s.SerialNumber == nil { + invalidParams.Add(request.NewErrParamRequired("SerialNumber")) + } + if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { + invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableMFADeviceOutput struct { _ struct{} `type:"structure"` } @@ -6236,6 +7084,22 @@ func (s GetAccessKeyLastUsedInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAccessKeyLastUsedInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAccessKeyLastUsedInput"} + if s.AccessKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) + } + if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { + invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetAccessKeyLastUsed request. It is // also returned as a member of the AccessKeyMetaData structure returned by // the ListAccessKeys action. @@ -6294,6 +7158,22 @@ func (s GetAccountAuthorizationDetailsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAccountAuthorizationDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAccountAuthorizationDetailsInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetAccountAuthorizationDetails request. type GetAccountAuthorizationDetailsOutput struct { _ struct{} `type:"structure"` @@ -6561,6 +7441,19 @@ func (s GetContextKeysForCustomPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetContextKeysForCustomPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetContextKeysForCustomPolicyInput"} + if s.PolicyInputList == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyInputList")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetContextKeysForPrincipalPolicy or // GetContextKeysForCustomPolicy request. type GetContextKeysForPolicyResponse struct { @@ -6608,6 +7501,22 @@ func (s GetContextKeysForPrincipalPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetContextKeysForPrincipalPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetContextKeysForPrincipalPolicyInput"} + if s.PolicySourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) + } + if s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetCredentialReportInput struct { _ struct{} `type:"structure"` } @@ -6683,6 +7592,28 @@ func (s GetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetGroup request. type GetGroupOutput struct { _ struct{} `type:"structure"` @@ -6736,6 +7667,28 @@ func (s GetGroupPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupPolicyInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetGroupPolicy request. type GetGroupPolicyOutput struct { _ struct{} `type:"structure"` @@ -6777,6 +7730,22 @@ func (s GetInstanceProfileInput) 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"} + if s.InstanceProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) + } + if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetInstanceProfile request. type GetInstanceProfileOutput struct { _ struct{} `type:"structure"` @@ -6812,6 +7781,22 @@ func (s GetLoginProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoginProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoginProfileInput"} + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetLoginProfile request. type GetLoginProfileOutput struct { _ struct{} `type:"structure"` @@ -6849,6 +7834,22 @@ func (s GetOpenIDConnectProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOpenIDConnectProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOpenIDConnectProviderInput"} + if s.OpenIDConnectProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetOpenIDConnectProvider request. type GetOpenIDConnectProviderOutput struct { _ struct{} `type:"structure"` @@ -6901,6 +7902,22 @@ func (s GetPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetPolicy request. type GetPolicyOutput struct { _ struct{} `type:"structure"` @@ -6943,6 +7960,25 @@ func (s GetPolicyVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPolicyVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPolicyVersionInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.VersionId == nil { + invalidParams.Add(request.NewErrParamRequired("VersionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetPolicyVersion request. type GetPolicyVersionOutput struct { _ struct{} `type:"structure"` @@ -6982,6 +8018,22 @@ func (s GetRoleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetRole request. type GetRoleOutput struct { _ struct{} `type:"structure"` @@ -7020,6 +8072,28 @@ func (s GetRolePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRolePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRolePolicyInput"} + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetRolePolicy request. type GetRolePolicyOutput struct { _ struct{} `type:"structure"` @@ -7061,6 +8135,22 @@ func (s GetSAMLProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSAMLProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSAMLProviderInput"} + if s.SAMLProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) + } + if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetSAMLProvider request. type GetSAMLProviderOutput struct { _ struct{} `type:"structure"` @@ -7110,6 +8200,31 @@ func (s GetSSHPublicKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSSHPublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSSHPublicKeyInput"} + if s.Encoding == nil { + invalidParams.Add(request.NewErrParamRequired("Encoding")) + } + if s.SSHPublicKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) + } + if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { + invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetSSHPublicKey request. type GetSSHPublicKeyOutput struct { _ struct{} `type:"structure"` @@ -7145,6 +8260,22 @@ func (s GetServerCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetServerCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetServerCertificateInput"} + if s.ServerCertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) + } + if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetServerCertificate request. type GetServerCertificateOutput struct { _ struct{} `type:"structure"` @@ -7183,6 +8314,19 @@ func (s GetUserInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetUserInput"} + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetUser request. type GetUserOutput struct { _ struct{} `type:"structure"` @@ -7221,6 +8365,28 @@ func (s GetUserPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetUserPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetUserPolicyInput"} + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful GetUserPolicy request. type GetUserPolicyOutput struct { _ struct{} `type:"structure"` @@ -7418,6 +8584,25 @@ func (s ListAccessKeysInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAccessKeysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAccessKeysInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListAccessKeys request. type ListAccessKeysOutput struct { _ struct{} `type:"structure"` @@ -7479,6 +8664,22 @@ func (s ListAccountAliasesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAccountAliasesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAccountAliasesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListAccountAliases request. type ListAccountAliasesOutput struct { _ struct{} `type:"structure"` @@ -7549,6 +8750,28 @@ func (s ListAttachedGroupPoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAttachedGroupPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAttachedGroupPoliciesInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListAttachedGroupPolicies request. type ListAttachedGroupPoliciesOutput struct { _ struct{} `type:"structure"` @@ -7617,6 +8840,28 @@ func (s ListAttachedRolePoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAttachedRolePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAttachedRolePoliciesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListAttachedRolePolicies request. type ListAttachedRolePoliciesOutput struct { _ struct{} `type:"structure"` @@ -7685,6 +8930,28 @@ func (s ListAttachedUserPoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAttachedUserPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAttachedUserPoliciesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListAttachedUserPolicies request. type ListAttachedUserPoliciesOutput struct { _ struct{} `type:"structure"` @@ -7764,6 +9031,31 @@ func (s ListEntitiesForPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEntitiesForPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEntitiesForPolicyInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) + } + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListEntitiesForPolicy request. type ListEntitiesForPolicyOutput struct { _ struct{} `type:"structure"` @@ -7834,6 +9126,28 @@ func (s ListGroupPoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupPoliciesInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListGroupPolicies request. type ListGroupPoliciesOutput struct { _ struct{} `type:"structure"` @@ -7898,6 +9212,28 @@ func (s ListGroupsForUserInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupsForUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupsForUserInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListGroupsForUser request. type ListGroupsForUserOutput struct { _ struct{} `type:"structure"` @@ -7966,6 +9302,25 @@ func (s ListGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListGroups request. type ListGroupsOutput struct { _ struct{} `type:"structure"` @@ -8030,6 +9385,28 @@ func (s ListInstanceProfilesForRoleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInstanceProfilesForRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesForRoleInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListInstanceProfilesForRole request. type ListInstanceProfilesForRoleOutput struct { _ struct{} `type:"structure"` @@ -8098,6 +9475,25 @@ func (s ListInstanceProfilesInput) 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"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListInstanceProfiles request. type ListInstanceProfilesOutput struct { _ struct{} `type:"structure"` @@ -8162,6 +9558,25 @@ func (s ListMFADevicesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMFADevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMFADevicesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListMFADevices request. type ListMFADevicesOutput struct { _ struct{} `type:"structure"` @@ -8275,6 +9690,22 @@ func (s ListPoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListPolicies request. type ListPoliciesOutput struct { _ struct{} `type:"structure"` @@ -8343,6 +9774,28 @@ func (s ListPolicyVersionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPolicyVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPolicyVersionsInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListPolicyVersions request. type ListPolicyVersionsOutput struct { _ struct{} `type:"structure"` @@ -8411,6 +9864,28 @@ func (s ListRolePoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRolePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRolePoliciesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListRolePolicies request. type ListRolePoliciesOutput struct { _ struct{} `type:"structure"` @@ -8479,6 +9954,25 @@ func (s ListRolesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRolesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRolesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListRoles request. type ListRolesOutput struct { _ struct{} `type:"structure"` @@ -8577,6 +10071,25 @@ func (s ListSSHPublicKeysInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSSHPublicKeysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSSHPublicKeysInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListSSHPublicKeys request. type ListSSHPublicKeysOutput struct { _ struct{} `type:"structure"` @@ -8645,6 +10158,25 @@ func (s ListServerCertificatesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListServerCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListServerCertificatesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListServerCertificates request. type ListServerCertificatesOutput struct { _ struct{} `type:"structure"` @@ -8709,6 +10241,25 @@ func (s ListSigningCertificatesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSigningCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSigningCertificatesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListSigningCertificates request. type ListSigningCertificatesOutput struct { _ struct{} `type:"structure"` @@ -8773,6 +10324,28 @@ func (s ListUserPoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListUserPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListUserPoliciesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListUserPolicies request. type ListUserPoliciesOutput struct { _ struct{} `type:"structure"` @@ -8841,6 +10414,25 @@ func (s ListUsersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListUsersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PathPrefix != nil && len(*s.PathPrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListUsers request. type ListUsersOutput struct { _ struct{} `type:"structure"` @@ -8907,6 +10499,22 @@ func (s ListVirtualMFADevicesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVirtualMFADevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVirtualMFADevicesInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful ListVirtualMFADevices request. type ListVirtualMFADevicesOutput struct { _ struct{} `type:"structure"` @@ -9424,6 +11032,34 @@ func (s PutGroupPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutGroupPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutGroupPolicyInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + } + if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutGroupPolicyOutput struct { _ struct{} `type:"structure"` } @@ -9461,6 +11097,34 @@ func (s PutRolePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRolePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRolePolicyInput"} + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + } + if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutRolePolicyOutput struct { _ struct{} `type:"structure"` } @@ -9498,6 +11162,34 @@ func (s PutUserPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutUserPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutUserPolicyInput"} + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + } + if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutUserPolicyOutput struct { _ struct{} `type:"structure"` } @@ -9535,6 +11227,28 @@ func (s RemoveClientIDFromOpenIDConnectProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveClientIDFromOpenIDConnectProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveClientIDFromOpenIDConnectProviderInput"} + if s.ClientID == nil { + invalidParams.Add(request.NewErrParamRequired("ClientID")) + } + if s.ClientID != nil && len(*s.ClientID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientID", 1)) + } + if s.OpenIDConnectProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveClientIDFromOpenIDConnectProviderOutput struct { _ struct{} `type:"structure"` } @@ -9569,6 +11283,28 @@ func (s RemoveRoleFromInstanceProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveRoleFromInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromInstanceProfileInput"} + if s.InstanceProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) + } + if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveRoleFromInstanceProfileOutput struct { _ struct{} `type:"structure"` } @@ -9603,6 +11339,28 @@ func (s RemoveUserFromGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveUserFromGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveUserFromGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveUserFromGroupOutput struct { _ struct{} `type:"structure"` } @@ -9692,6 +11450,40 @@ func (s ResyncMFADeviceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResyncMFADeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResyncMFADeviceInput"} + if s.AuthenticationCode1 == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationCode1")) + } + if s.AuthenticationCode1 != nil && len(*s.AuthenticationCode1) < 6 { + invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode1", 6)) + } + if s.AuthenticationCode2 == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationCode2")) + } + if s.AuthenticationCode2 != nil && len(*s.AuthenticationCode2) < 6 { + invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode2", 6)) + } + if s.SerialNumber == nil { + invalidParams.Add(request.NewErrParamRequired("SerialNumber")) + } + if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { + invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ResyncMFADeviceOutput struct { _ struct{} `type:"structure"` } @@ -10003,6 +11795,25 @@ func (s SetDefaultPolicyVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetDefaultPolicyVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetDefaultPolicyVersionInput"} + if s.PolicyArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyArn")) + } + if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) + } + if s.VersionId == nil { + invalidParams.Add(request.NewErrParamRequired("VersionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetDefaultPolicyVersionOutput struct { _ struct{} `type:"structure"` } @@ -10181,6 +11992,50 @@ func (s SimulateCustomPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SimulateCustomPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SimulateCustomPolicyInput"} + if s.ActionNames == nil { + invalidParams.Add(request.NewErrParamRequired("ActionNames")) + } + if s.CallerArn != nil && len(*s.CallerArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CallerArn", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PolicyInputList == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyInputList")) + } + if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) + } + if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) + } + if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) + } + if s.ContextEntries != nil { + for i, v := range s.ContextEntries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContextEntries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy // request. type SimulatePolicyResponse struct { @@ -10348,6 +12203,53 @@ func (s SimulatePrincipalPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SimulatePrincipalPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SimulatePrincipalPolicyInput"} + if s.ActionNames == nil { + invalidParams.Add(request.NewErrParamRequired("ActionNames")) + } + if s.CallerArn != nil && len(*s.CallerArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CallerArn", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PolicySourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) + } + if s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) + } + if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) + } + if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) + } + if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) + } + if s.ContextEntries != nil { + for i, v := range s.ContextEntries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContextEntries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains a reference to a Statement element in a policy document that determines // the result of the simulation. // @@ -10404,6 +12306,28 @@ func (s UpdateAccessKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAccessKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAccessKeyInput"} + if s.AccessKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) + } + if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { + invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateAccessKeyOutput struct { _ struct{} `type:"structure"` } @@ -10489,6 +12413,25 @@ func (s UpdateAccountPasswordPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAccountPasswordPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAccountPasswordPolicyInput"} + if s.MaxPasswordAge != nil && *s.MaxPasswordAge < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxPasswordAge", 1)) + } + if s.MinimumPasswordLength != nil && *s.MinimumPasswordLength < 6 { + invalidParams.Add(request.NewErrParamMinValue("MinimumPasswordLength", 6)) + } + if s.PasswordReusePrevention != nil && *s.PasswordReusePrevention < 1 { + invalidParams.Add(request.NewErrParamMinValue("PasswordReusePrevention", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateAccountPasswordPolicyOutput struct { _ struct{} `type:"structure"` } @@ -10523,6 +12466,28 @@ func (s UpdateAssumeRolePolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAssumeRolePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAssumeRolePolicyInput"} + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + } + if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateAssumeRolePolicyOutput struct { _ struct{} `type:"structure"` } @@ -10561,6 +12526,28 @@ func (s UpdateGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.NewGroupName != nil && len(*s.NewGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewGroupName", 1)) + } + if s.NewPath != nil && len(*s.NewPath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateGroupOutput struct { _ struct{} `type:"structure"` } @@ -10598,6 +12585,25 @@ func (s UpdateLoginProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLoginProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLoginProfileInput"} + if s.Password != nil && len(*s.Password) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Password", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateLoginProfileOutput struct { _ struct{} `type:"structure"` } @@ -10635,6 +12641,25 @@ func (s UpdateOpenIDConnectProviderThumbprintInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateOpenIDConnectProviderThumbprintInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateOpenIDConnectProviderThumbprintInput"} + if s.OpenIDConnectProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) + } + if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) + } + if s.ThumbprintList == nil { + invalidParams.Add(request.NewErrParamRequired("ThumbprintList")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateOpenIDConnectProviderThumbprintOutput struct { _ struct{} `type:"structure"` } @@ -10673,6 +12698,28 @@ func (s UpdateSAMLProviderInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSAMLProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSAMLProviderInput"} + if s.SAMLMetadataDocument == nil { + invalidParams.Add(request.NewErrParamRequired("SAMLMetadataDocument")) + } + if s.SAMLMetadataDocument != nil && len(*s.SAMLMetadataDocument) < 1000 { + invalidParams.Add(request.NewErrParamMinLen("SAMLMetadataDocument", 1000)) + } + if s.SAMLProviderArn == nil { + invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) + } + if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful UpdateSAMLProvider request. type UpdateSAMLProviderOutput struct { _ struct{} `type:"structure"` @@ -10716,6 +12763,31 @@ func (s UpdateSSHPublicKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSSHPublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSSHPublicKeyInput"} + if s.SSHPublicKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) + } + if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { + invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateSSHPublicKeyOutput struct { _ struct{} `type:"structure"` } @@ -10756,6 +12828,28 @@ func (s UpdateServerCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateServerCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateServerCertificateInput"} + if s.NewPath != nil && len(*s.NewPath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) + } + if s.NewServerCertificateName != nil && len(*s.NewServerCertificateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewServerCertificateName", 1)) + } + if s.ServerCertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) + } + if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateServerCertificateOutput struct { _ struct{} `type:"structure"` } @@ -10795,6 +12889,28 @@ func (s UpdateSigningCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSigningCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSigningCertificateInput"} + if s.CertificateId == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateId")) + } + if s.CertificateId != nil && len(*s.CertificateId) < 24 { + invalidParams.Add(request.NewErrParamMinLen("CertificateId", 24)) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateSigningCertificateOutput struct { _ struct{} `type:"structure"` } @@ -10835,6 +12951,28 @@ func (s UpdateUserInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"} + if s.NewPath != nil && len(*s.NewPath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) + } + if s.NewUserName != nil && len(*s.NewUserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewUserName", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateUserOutput struct { _ struct{} `type:"structure"` } @@ -10870,6 +13008,28 @@ func (s UploadSSHPublicKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadSSHPublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadSSHPublicKeyInput"} + if s.SSHPublicKeyBody == nil { + invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyBody")) + } + if s.SSHPublicKeyBody != nil && len(*s.SSHPublicKeyBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyBody", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful UploadSSHPublicKey request. type UploadSSHPublicKeyOutput struct { _ struct{} `type:"structure"` @@ -10929,6 +13089,40 @@ func (s UploadServerCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadServerCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadServerCertificateInput"} + if s.CertificateBody == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateBody")) + } + if s.CertificateBody != nil && len(*s.CertificateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificateBody", 1)) + } + if s.CertificateChain != nil && len(*s.CertificateChain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificateChain", 1)) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + if s.PrivateKey == nil { + invalidParams.Add(request.NewErrParamRequired("PrivateKey")) + } + if s.PrivateKey != nil && len(*s.PrivateKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PrivateKey", 1)) + } + if s.ServerCertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) + } + if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful UploadServerCertificate request. type UploadServerCertificateOutput struct { _ struct{} `type:"structure"` @@ -10968,6 +13162,25 @@ func (s UploadSigningCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadSigningCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadSigningCertificateInput"} + if s.CertificateBody == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateBody")) + } + if s.CertificateBody != nil && len(*s.CertificateBody) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificateBody", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a successful UploadSigningCertificate request. type UploadSigningCertificateOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go index 87b12e508..db65419d4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go @@ -4,6 +4,7 @@ package kinesis import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -67,11 +68,10 @@ func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *request.Re return } -// Creates a Amazon Kinesis stream. A stream captures and transports data records +// Creates an Amazon Kinesis stream. A stream captures and transports data records // that are continuously emitted from different data sources or producers. Scale-out -// within an Amazon Kinesis stream is explicitly supported by means of shards, -// which are uniquely identified groups of data records in an Amazon Kinesis -// stream. +// within a stream is explicitly supported by means of shards, which are uniquely +// identified groups of data records in a stream. // // You specify and control the number of shards that a stream is composed of. // Each shard can support reads up to 5 transactions per second, up to a maximum @@ -96,8 +96,9 @@ func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *request.Re // // Have more than five streams in the CREATING state at any point in time. // Create more shards than are authorized for your account. For the default -// shard limit for an AWS account, see Amazon Kinesis Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html). -// If you need to increase this limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). +// shard limit for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) +// in the Amazon Kinesis Streams Developer Guide. If you need to increase this +// limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). // // You can use DescribeStream to check the stream status, which is returned // in StreamStatus. @@ -131,9 +132,9 @@ func (c *Kinesis) DecreaseStreamRetentionPeriodRequest(input *DecreaseStreamRete return } -// Decreases the stream's retention period, which is the length of time data -// records are accessible after they are added to the stream. The minimum value -// of a stream’s retention period is 24 hours. +// Decreases the Amazon Kinesis stream's retention period, which is the length +// of time data records are accessible after they are added to the stream. The +// minimum value of a stream's retention period is 24 hours. // // This operation may result in lost data. For example, if the stream's retention // period is 48 hours and is decreased to 24 hours, any data already in the @@ -166,9 +167,10 @@ func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Re return } -// Deletes a stream and all its shards and data. You must shut down any applications -// that are operating on the stream before you delete the stream. If an application -// attempts to operate on a deleted stream, it will receive the exception ResourceNotFoundException. +// Deletes an Amazon Kinesis stream and all its shards and data. You must shut +// down any applications that are operating on the stream before you delete +// the stream. If an application attempts to operate on a deleted stream, it +// will receive the exception ResourceNotFoundException. // // If the stream is in the ACTIVE state, you can delete it. After a DeleteStream // request, the specified stream is in the DELETING state until Amazon Kinesis @@ -217,15 +219,15 @@ func (c *Kinesis) DescribeStreamRequest(input *DescribeStreamInput) (req *reques return } -// Describes the specified stream. +// Describes the specified Amazon Kinesis stream. // // The information about the stream includes its current status, its Amazon // Resource Name (ARN), and an array of shard objects. For each shard object, // there is information about the hash key and sequence number ranges that the // shard spans, and the IDs of any earlier shards that played in a role in creating // the shard. A sequence number is the identifier associated with every record -// ingested in the Amazon Kinesis stream. The sequence number is assigned when -// a record is put into the stream. +// ingested in the stream. The sequence number is assigned when a record is +// put into the stream. // // You can limit the number of returned shards using the Limit parameter. The // number of shards in a stream may be too large to return from a single call @@ -238,6 +240,10 @@ func (c *Kinesis) DescribeStreamRequest(input *DescribeStreamInput) (req *reques // this ID in the ExclusiveStartShardId parameter in a subsequent request to // DescribeStream. // +// There are no guarantees about the chronological order shards returned in +// DescribeStream results. If you want to process shards in chronological order, +// use ParentShardId to track lineage to the oldest shard. +// // DescribeStream has a limit of 10 transactions per second per account. func (c *Kinesis) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) { req, out := c.DescribeStreamRequest(input) @@ -253,6 +259,60 @@ func (c *Kinesis) DescribeStreamPages(input *DescribeStreamInput, fn func(p *Des }) } +const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring" + +// DisableEnhancedMonitoringRequest generates a request for the DisableEnhancedMonitoring operation. +func (c *Kinesis) DisableEnhancedMonitoringRequest(input *DisableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) { + op := &request.Operation{ + Name: opDisableEnhancedMonitoring, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableEnhancedMonitoringInput{} + } + + req = c.newRequest(op, input, output) + output = &EnhancedMonitoringOutput{} + req.Data = output + return +} + +// Disables enhanced monitoring. +func (c *Kinesis) DisableEnhancedMonitoring(input *DisableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) { + req, out := c.DisableEnhancedMonitoringRequest(input) + err := req.Send() + return out, err +} + +const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring" + +// EnableEnhancedMonitoringRequest generates a request for the EnableEnhancedMonitoring operation. +func (c *Kinesis) EnableEnhancedMonitoringRequest(input *EnableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) { + op := &request.Operation{ + Name: opEnableEnhancedMonitoring, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableEnhancedMonitoringInput{} + } + + req = c.newRequest(op, input, output) + output = &EnhancedMonitoringOutput{} + req.Data = output + return +} + +// Enables enhanced Amazon Kinesis stream monitoring for shard-level metrics. +func (c *Kinesis) EnableEnhancedMonitoring(input *EnableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) { + req, out := c.EnableEnhancedMonitoringRequest(input) + err := req.Send() + return out, err +} + const opGetRecords = "GetRecords" // GetRecordsRequest generates a request for the GetRecords operation. @@ -273,7 +333,7 @@ func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Reques return } -// Gets data records from a shard. +// Gets data records from an Amazon Kinesis stream's shard. // // Specify a shard iterator using the ShardIterator parameter. The shard iterator // specifies the position in the shard from which you want to start reading @@ -282,7 +342,9 @@ func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Reques // Note that it might take multiple calls to get to a portion of the shard that // contains records. // -// You can scale by provisioning multiple shards. Your application should have +// You can scale by provisioning multiple shards per stream while considering +// service limits (for more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) +// in the Amazon Kinesis Streams Developer Guide). Your application should have // one thread per shard, each reading continuously from its stream. To read // from a stream continually, call GetRecords in a loop. Use GetShardIterator // to get the shard iterator to specify in the first GetRecords call. GetRecords @@ -300,7 +362,7 @@ func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Reques // maximum number of records that GetRecords can return. Consider your average // record size when determining this limit. // -// The size of the data returned by GetRecords will vary depending on the utilization +// The size of the data returned by GetRecords varies depending on the utilization // of the shard. The maximum size of data that GetRecords can return is 10 MB. // If a call returns this amount of data, subsequent calls made within the next // 5 seconds throw ProvisionedThroughputExceededException. If there is insufficient @@ -312,17 +374,18 @@ func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Reques // // To detect whether the application is falling behind in processing, you can // use the MillisBehindLatest response attribute. You can also monitor the stream -// using CloudWatch metrics (see Monitoring Amazon Kinesis (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html) -// in the Amazon Kinesis Developer Guide). +// using CloudWatch metrics and other mechanisms (see Monitoring (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html) +// in the Amazon Kinesis Streams Developer Guide). // // Each Amazon Kinesis record includes a value, ApproximateArrivalTimestamp, -// that is set when an Amazon Kinesis stream successfully receives and stores -// a record. This is commonly referred to as a server-side timestamp, which -// is different than a client-side timestamp, where the timestamp is set when -// a data producer creates or sends the record to a stream. The timestamp has -// millisecond precision. There are no guarantees about the timestamp accuracy, -// or that the timestamp is always increasing. For example, records in a shard -// or across a stream might have timestamps that are out of order. +// that is set when a stream successfully receives and stores a record. This +// is commonly referred to as a server-side timestamp, whereas a client-side +// timestamp is set when a data producer creates or sends the record to a stream +// (a data producer is any data source putting data records into a stream, for +// example with PutRecords). The timestamp has millisecond precision. There +// are no guarantees about the timestamp accuracy, or that the timestamp is +// always increasing. For example, records in a shard or across a stream might +// have timestamps that are out of order. func (c *Kinesis) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) { req, out := c.GetRecordsRequest(input) err := req.Send() @@ -349,40 +412,41 @@ func (c *Kinesis) GetShardIteratorRequest(input *GetShardIteratorInput) (req *re return } -// Gets a shard iterator. A shard iterator expires five minutes after it is -// returned to the requester. +// Gets an Amazon Kinesis shard iterator. A shard iterator expires five minutes +// after it is returned to the requester. // -// A shard iterator specifies the position in the shard from which to start -// reading data records sequentially. A shard iterator specifies this position -// using the sequence number of a data record in a shard. A sequence number -// is the identifier associated with every record ingested in the Amazon Kinesis -// stream. The sequence number is assigned when a record is put into the stream. +// A shard iterator specifies the shard position from which to start reading +// data records sequentially. The position is specified using the sequence number +// of a data record in a shard. A sequence number is the identifier associated +// with every record ingested in the stream, and is assigned when a record is +// put into the stream. Each stream has one or more shards. // // You must specify the shard iterator type. For example, you can set the ShardIteratorType // parameter to read exactly from the position denoted by a specific sequence // number by using the AT_SEQUENCE_NUMBER shard iterator type, or right after // the sequence number by using the AFTER_SEQUENCE_NUMBER shard iterator type, // using sequence numbers returned by earlier calls to PutRecord, PutRecords, -// GetRecords, or DescribeStream. You can specify the shard iterator type TRIM_HORIZON -// in the request to cause ShardIterator to point to the last untrimmed record -// in the shard in the system, which is the oldest data record in the shard. -// Or you can point to just after the most recent record in the shard, by using -// the shard iterator type LATEST, so that you always read the most recent data -// in the shard. +// GetRecords, or DescribeStream. In the request, you can specify the shard +// iterator type AT_TIMESTAMP to read records from an arbitrary point in time, +// TRIM_HORIZON to cause ShardIterator to point to the last untrimmed record +// in the shard in the system (the oldest data record in the shard), or LATEST +// so that you always read the most recent data in the shard. // -// When you repeatedly read from an Amazon Kinesis stream use a GetShardIterator -// request to get the first shard iterator for use in your first GetRecords -// request and then use the shard iterator returned by the GetRecords request -// in NextShardIterator for subsequent reads. A new shard iterator is returned -// by every GetRecords request in NextShardIterator, which you use in the ShardIterator -// parameter of the next GetRecords request. +// When you read repeatedly from a stream, use a GetShardIterator request to +// get the first shard iterator for use in your first GetRecords request and +// for subsequent reads use the shard iterator returned by the GetRecords request +// in NextShardIterator. A new shard iterator is returned by every GetRecords +// request in NextShardIterator, which you use in the ShardIterator parameter +// of the next GetRecords request. // // If a GetShardIterator request is made too often, you receive a ProvisionedThroughputExceededException. -// For more information about throughput limits, see GetRecords. +// For more information about throughput limits, see GetRecords, and Streams +// Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) +// in the Amazon Kinesis Streams Developer Guide. // -// If the shard is closed, the iterator can't return more data, and GetShardIterator -// returns null for its ShardIterator. A shard can be closed using SplitShard -// or MergeShards. +// If the shard is closed, GetShardIterator returns a valid iterator for the +// last sequence number of the shard. Note that a shard can be closed as a result +// of using SplitShard or MergeShards. // // GetShardIterator has a limit of 5 transactions per second per account per // open shard. @@ -414,15 +478,15 @@ func (c *Kinesis) IncreaseStreamRetentionPeriodRequest(input *IncreaseStreamRete return } -// Increases the stream's retention period, which is the length of time data -// records are accessible after they are added to the stream. The maximum value -// of a stream’s retention period is 168 hours (7 days). +// Increases the Amazon Kinesis stream's retention period, which is the length +// of time data records are accessible after they are added to the stream. The +// maximum value of a stream's retention period is 168 hours (7 days). // // Upon choosing a longer stream retention period, this operation will increase // the time period records are accessible that have not yet expired. However, -// it will not make previous data that has expired (older than the stream’s +// it will not make previous data that has expired (older than the stream's // previous retention period) accessible after the operation has been called. -// For example, if a stream’s retention period is set to 24 hours and is increased +// For example, if a stream's retention period is set to 24 hours and is increased // to 168 hours, any data that is older than 24 hours will remain inaccessible // to consumer applications. func (c *Kinesis) IncreaseStreamRetentionPeriod(input *IncreaseStreamRetentionPeriodInput) (*IncreaseStreamRetentionPeriodOutput, error) { @@ -457,14 +521,14 @@ func (c *Kinesis) ListStreamsRequest(input *ListStreamsInput) (req *request.Requ return } -// Lists your streams. +// Lists your Amazon Kinesis streams. // -// The number of streams may be too large to return from a single call to -// ListStreams. You can limit the number of returned streams using the Limit -// parameter. If you do not specify a value for the Limit parameter, Amazon -// Kinesis uses the default limit, which is currently 10. +// The number of streams may be too large to return from a single call to ListStreams. +// You can limit the number of returned streams using the Limit parameter. If +// you do not specify a value for the Limit parameter, Amazon Kinesis uses the +// default limit, which is currently 10. // -// You can detect if there are more streams available to list by using the +// You can detect if there are more streams available to list by using the // HasMoreStreams flag from the returned output. If there are more streams available, // you can request more streams by using the name of the last stream returned // by the ListStreams request in the ExclusiveStartStreamName parameter in a @@ -536,20 +600,21 @@ func (c *Kinesis) MergeShardsRequest(input *MergeShardsInput) (req *request.Requ return } -// Merges two adjacent shards in a stream and combines them into a single shard -// to reduce the stream's capacity to ingest and transport data. Two shards -// are considered adjacent if the union of the hash key ranges for the two shards -// form a contiguous set with no gaps. For example, if you have two shards, -// one with a hash key range of 276...381 and the other with a hash key range -// of 382...454, then you could merge these two shards into a single shard that -// would have a hash key range of 276...454. After the merge, the single child -// shard receives data for all hash key values covered by the two parent shards. +// Merges two adjacent shards in an Amazon Kinesis stream and combines them +// into a single shard to reduce the stream's capacity to ingest and transport +// data. Two shards are considered adjacent if the union of the hash key ranges +// for the two shards form a contiguous set with no gaps. For example, if you +// have two shards, one with a hash key range of 276...381 and the other with +// a hash key range of 382...454, then you could merge these two shards into +// a single shard that would have a hash key range of 276...454. After the merge, +// the single child shard receives data for all hash key values covered by the +// two parent shards. // // MergeShards is called when there is a need to reduce the overall capacity // of a stream because of excess capacity that is not being used. You must specify // the shard to be merged and the adjacent shard for a stream. For more information // about merging shards, see Merge Two Shards (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html) -// in the Amazon Kinesis Developer Guide. +// in the Amazon Kinesis Streams Developer Guide. // // If the stream is in the ACTIVE state, you can call MergeShards. If a stream // is in the CREATING, UPDATING, or DELETING state, MergeShards returns a ResourceInUseException. @@ -597,11 +662,10 @@ func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request.Request, return } -// Writes a single data record from a producer into an Amazon Kinesis stream. -// Call PutRecord to send data from the producer into the Amazon Kinesis stream -// for real-time ingestion and subsequent processing, one record at a time. -// Each shard can support writes up to 1,000 records per second, up to a maximum -// data write total of 1 MB per second. +// Writes a single data record into an Amazon Kinesis stream. Call PutRecord +// to send data into the stream for real-time ingestion and subsequent processing, +// one record at a time. Each shard can support writes up to 1,000 records per +// second, up to a maximum data write total of 1 MB per second. // // You must specify the name of the stream that captures, stores, and transports // the data; a partition key; and the data blob itself. @@ -610,9 +674,9 @@ func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request.Request, // file, geographic/location data, website clickstream data, and so on. // // The partition key is used by Amazon Kinesis to distribute data across shards. -// Amazon Kinesis segregates the data records that belong to a data stream into -// multiple shards, using the partition key associated with each data record -// to determine which shard a given data record belongs to. +// Amazon Kinesis segregates the data records that belong to a stream into multiple +// shards, using the partition key associated with each data record to determine +// which shard a given data record belongs to. // // Partition keys are Unicode strings, with a maximum length limit of 256 characters // for each key. An MD5 hash function is used to map partition keys to 128-bit @@ -620,23 +684,22 @@ func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request.Request, // key ranges of the shards. You can override hashing the partition key to determine // the shard by explicitly specifying a hash value using the ExplicitHashKey // parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream) -// in the Amazon Kinesis Developer Guide. +// in the Amazon Kinesis Streams Developer Guide. // // PutRecord returns the shard ID of where the data record was placed and the // sequence number that was assigned to the data record. // -// Sequence numbers generally increase over time. To guarantee strictly increasing -// ordering, use the SequenceNumberForOrdering parameter. For more information, -// see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream) -// in the Amazon Kinesis Developer Guide. +// Sequence numbers increase over time and are specific to a shard within a +// stream, not across all shards within a stream. To guarantee strictly increasing +// ordering, write serially to a shard and use the SequenceNumberForOrdering +// parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream) +// in the Amazon Kinesis Streams Developer Guide. // // If a PutRecord request cannot be processed because of insufficient provisioned // throughput on the shard involved in the request, PutRecord throws ProvisionedThroughputExceededException. // -// By default, data records are accessible for only 24 hours from the time -// that they are added to an Amazon Kinesis stream. This retention period can -// be modified using the DecreaseStreamRetentionPeriod and IncreaseStreamRetentionPeriod -// operations. +// Data records are accessible for only 24 hours from the time that they are +// added to a stream. func (c *Kinesis) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) { req, out := c.PutRecordRequest(input) err := req.Send() @@ -663,10 +726,9 @@ func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *request.Reques return } -// Writes multiple data records from a producer into an Amazon Kinesis stream -// in a single call (also referred to as a PutRecords request). Use this operation -// to send data from a data producer into the Amazon Kinesis stream for data -// ingestion and processing. +// Writes multiple data records into an Amazon Kinesis stream in a single call +// (also referred to as a PutRecords request). Use this operation to send data +// into the stream for data ingestion and processing. // // Each PutRecords request can support up to 500 records. Each record in the // request can be as large as 1 MB, up to a limit of 5 MB for the entire request, @@ -687,13 +749,13 @@ func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *request.Reques // to map associated data records to shards. As a result of this hashing mechanism, // all data records with the same partition key map to the same shard within // the stream. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream) -// in the Amazon Kinesis Developer Guide. +// in the Amazon Kinesis Streams Developer Guide. // // Each record in the Records array may include an optional parameter, ExplicitHashKey, // which overrides the partition key to shard mapping. This parameter allows // a data producer to determine explicitly the shard where the record is stored. // For more information, see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords) -// in the Amazon Kinesis Developer Guide. +// in the Amazon Kinesis Streams Developer Guide. // // The PutRecords response includes an array of response Records. Each record // in the response array directly correlates with a record in the request array @@ -718,7 +780,7 @@ func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *request.Reques // exception including the account ID, stream name, and shard ID of the record // that was throttled. For more information about partially successful responses, // see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords) -// in the Amazon Kinesis Developer Guide. +// in the Amazon Kinesis Streams Developer Guide. // // By default, data records are accessible for only 24 hours from the time // that they are added to an Amazon Kinesis stream. This retention period can @@ -752,7 +814,8 @@ func (c *Kinesis) RemoveTagsFromStreamRequest(input *RemoveTagsFromStreamInput) return } -// Deletes tags from the specified Amazon Kinesis stream. +// Removes tags from the specified Amazon Kinesis stream. Removed tags are deleted +// and cannot be recovered after this operation successfully completes. // // If you specify a tag that does not exist, it is ignored. func (c *Kinesis) RemoveTagsFromStream(input *RemoveTagsFromStreamInput) (*RemoveTagsFromStreamOutput, error) { @@ -783,24 +846,23 @@ func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Reques return } -// Splits a shard into two new shards in the stream, to increase the stream's -// capacity to ingest and transport data. SplitShard is called when there is -// a need to increase the overall capacity of stream because of an expected -// increase in the volume of data records being ingested. +// Splits a shard into two new shards in the Amazon Kinesis stream to increase +// the stream's capacity to ingest and transport data. SplitShard is called +// when there is a need to increase the overall capacity of a stream because +// of an expected increase in the volume of data records being ingested. // // You can also use SplitShard when a shard appears to be approaching its maximum -// utilization, for example, when the set of producers sending data into the -// specific shard are suddenly sending more than previously anticipated. You -// can also call SplitShard to increase stream capacity, so that more Amazon -// Kinesis applications can simultaneously read data from the stream for real-time -// processing. +// utilization; for example, the producers sending data into the specific shard +// are suddenly sending more than previously anticipated. You can also call +// SplitShard to increase stream capacity, so that more Amazon Kinesis applications +// can simultaneously read data from the stream for real-time processing. // // You must specify the shard to be split and the new hash key, which is the // position in the shard where the shard gets split in two. In many cases, the // new hash key might simply be the average of the beginning and ending hash // key, but it can be any hash key value in the range being mapped into the // shard. For more information about splitting shards, see Split a Shard (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html) -// in the Amazon Kinesis Developer Guide. +// in the Amazon Kinesis Streams Developer Guide. // // You can use DescribeStream to determine the shard ID and hash key values // for the ShardToSplit and NewStartingHashKey parameters that are specified @@ -821,12 +883,12 @@ func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Reques // If you try to create more shards than are authorized for your account, you // receive a LimitExceededException. // -// For the default shard limit for an AWS account, see Amazon Kinesis Limits -// (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html). -// If you need to increase this limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). +// For the default shard limit for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html) +// in the Amazon Kinesis Streams Developer Guide. If you need to increase this +// limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). // -// If you try to operate on too many streams in parallel using CreateStream, -// DeleteStream, MergeShards or SplitShard, you receive a LimitExceededException. +// If you try to operate on too many streams simultaneously using CreateStream, +// DeleteStream, MergeShards, and/or SplitShard, you receive a LimitExceededException. // // SplitShard has limit of 5 transactions per second per account. func (c *Kinesis) SplitShard(input *SplitShardInput) (*SplitShardOutput, error) { @@ -856,6 +918,28 @@ func (s AddTagsToStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToStreamInput"} + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddTagsToStreamOutput struct { _ struct{} `type:"structure"` } @@ -884,7 +968,7 @@ type CreateStreamInput struct { // A name to identify the stream. The stream name is scoped to the AWS account // used by the application that creates the stream. It is also scoped by region. // That is, two streams in two different AWS accounts can have the same name, - // and two streams in the same AWS account, but in two different regions, can + // and two streams in the same AWS account but in two different regions can // have the same name. StreamName *string `min:"1" type:"string" required:"true"` } @@ -899,6 +983,28 @@ func (s CreateStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStreamInput"} + if s.ShardCount == nil { + invalidParams.Add(request.NewErrParamRequired("ShardCount")) + } + if s.ShardCount != nil && *s.ShardCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("ShardCount", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateStreamOutput struct { _ struct{} `type:"structure"` } @@ -935,6 +1041,28 @@ func (s DecreaseStreamRetentionPeriodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DecreaseStreamRetentionPeriodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecreaseStreamRetentionPeriodInput"} + if s.RetentionPeriodHours == nil { + invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours")) + } + if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 24 { + invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 24)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DecreaseStreamRetentionPeriodOutput struct { _ struct{} `type:"structure"` } @@ -967,6 +1095,22 @@ func (s DeleteStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStreamInput"} + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteStreamOutput struct { _ struct{} `type:"structure"` } @@ -1005,6 +1149,28 @@ func (s DescribeStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"} + if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output for DescribeStream. type DescribeStreamOutput struct { _ struct{} `type:"structure"` @@ -1024,6 +1190,163 @@ func (s DescribeStreamOutput) GoString() string { return s.String() } +// Represents the input for DisableEnhancedMonitoring. +type DisableEnhancedMonitoringInput struct { + _ struct{} `type:"structure"` + + // List of shard-level metrics to disable. + // + // The following are the valid shard-level metrics. The value "ALL" disables + // every metric. + // + // IncomingBytes IncomingRecords OutgoingBytes OutgoingRecords WriteProvisionedThroughputExceeded + // ReadProvisionedThroughputExceeded IteratorAgeMilliseconds ALL For + // more information, see Monitoring the Amazon Kinesis Streams Service with + // Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html) + // in the Amazon Kinesis Streams Developer Guide. + ShardLevelMetrics []*string `min:"1" type:"list" required:"true"` + + // The name of the Amazon Kinesis stream for which to disable enhanced monitoring. + StreamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableEnhancedMonitoringInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableEnhancedMonitoringInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableEnhancedMonitoringInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableEnhancedMonitoringInput"} + if s.ShardLevelMetrics == nil { + invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics")) + } + if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Represents the input for EnableEnhancedMonitoring. +type EnableEnhancedMonitoringInput struct { + _ struct{} `type:"structure"` + + // List of shard-level metrics to enable. + // + // The following are the valid shard-level metrics. The value "ALL" enables + // every metric. + // + // IncomingBytes IncomingRecords OutgoingBytes OutgoingRecords WriteProvisionedThroughputExceeded + // ReadProvisionedThroughputExceeded IteratorAgeMilliseconds ALL For + // more information, see Monitoring the Amazon Kinesis Streams Service with + // Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html) + // in the Amazon Kinesis Streams Developer Guide. + ShardLevelMetrics []*string `min:"1" type:"list" required:"true"` + + // The name of the stream for which to enable enhanced monitoring. + StreamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableEnhancedMonitoringInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableEnhancedMonitoringInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableEnhancedMonitoringInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableEnhancedMonitoringInput"} + if s.ShardLevelMetrics == nil { + invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics")) + } + if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Represents enhanced metrics types. +type EnhancedMetrics struct { + _ struct{} `type:"structure"` + + // List of shard-level metrics. + // + // The following are the valid shard-level metrics. The value "ALL" enhances + // every metric. + // + // IncomingBytes IncomingRecords OutgoingBytes OutgoingRecords WriteProvisionedThroughputExceeded + // ReadProvisionedThroughputExceeded IteratorAgeMilliseconds ALL For + // more information, see Monitoring the Amazon Kinesis Streams Service with + // Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html) + // in the Amazon Kinesis Streams Developer Guide. + ShardLevelMetrics []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s EnhancedMetrics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnhancedMetrics) GoString() string { + return s.String() +} + +// Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring. +type EnhancedMonitoringOutput struct { + _ struct{} `type:"structure"` + + // Represents the current state of the metrics that are in the enhanced state + // before the operation. + CurrentShardLevelMetrics []*string `min:"1" type:"list"` + + // Represents the list of all the metrics that would be in the enhanced state + // after the operation. + DesiredShardLevelMetrics []*string `min:"1" type:"list"` + + // The name of the Amazon Kinesis stream. + StreamName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s EnhancedMonitoringOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnhancedMonitoringOutput) GoString() string { + return s.String() +} + // Represents the input for GetRecords. type GetRecordsInput struct { _ struct{} `type:"structure"` @@ -1048,6 +1371,25 @@ func (s GetRecordsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRecordsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.ShardIterator == nil { + invalidParams.Add(request.NewErrParamRequired("ShardIterator")) + } + if s.ShardIterator != nil && len(*s.ShardIterator) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output for GetRecords. type GetRecordsOutput struct { _ struct{} `type:"structure"` @@ -1081,29 +1423,40 @@ func (s GetRecordsOutput) GoString() string { type GetShardIteratorInput struct { _ struct{} `type:"structure"` - // The shard ID of the shard to get the iterator for. + // The shard ID of the Amazon Kinesis shard to get the iterator for. ShardId *string `min:"1" type:"string" required:"true"` // Determines how the shard iterator is used to start reading data records from // the shard. // - // The following are the valid shard iterator types: + // The following are the valid Amazon Kinesis shard iterator types: // - // AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted by - // a specific sequence number. AFTER_SEQUENCE_NUMBER - Start reading right after - // the position denoted by a specific sequence number. TRIM_HORIZON - Start - // reading at the last untrimmed record in the shard in the system, which is - // the oldest data record in the shard. LATEST - Start reading just after the - // most recent record in the shard, so that you always read the most recent - // data in the shard. + // AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific + // sequence number, provided in the value StartingSequenceNumber. AFTER_SEQUENCE_NUMBER + // - Start reading right after the position denoted by a specific sequence number, + // provided in the value StartingSequenceNumber. AT_TIMESTAMP - Start reading + // from the position denoted by a specific timestamp, provided in the value + // Timestamp. TRIM_HORIZON - Start reading at the last untrimmed record in the + // shard in the system, which is the oldest data record in the shard. LATEST + // - Start reading just after the most recent record in the shard, so that you + // always read the most recent data in the shard. ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"` - // The sequence number of the data record in the shard from which to start reading - // from. + // The sequence number of the data record in the shard from which to start reading. + // Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER. StartingSequenceNumber *string `type:"string"` - // The name of the stream. + // The name of the Amazon Kinesis stream. StreamName *string `min:"1" type:"string" required:"true"` + + // The timestamp of the data record from which to start reading. Used with shard + // iterator type AT_TIMESTAMP. A timestamp is the Unix epoch date with precision + // in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or 1459799926.480. + // If a record with this exact timestamp does not exist, the iterator returned + // is for the next (later) record. If the timestamp is older than the current + // trim horizon, the iterator returned is for the oldest untrimmed data record + // (TRIM_HORIZON). + Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"` } // String returns the string representation @@ -1116,6 +1469,31 @@ func (s GetShardIteratorInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetShardIteratorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"} + if s.ShardId == nil { + invalidParams.Add(request.NewErrParamRequired("ShardId")) + } + if s.ShardId != nil && len(*s.ShardId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ShardId", 1)) + } + if s.ShardIteratorType == nil { + invalidParams.Add(request.NewErrParamRequired("ShardIteratorType")) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output for GetShardIterator. type GetShardIteratorOutput struct { _ struct{} `type:"structure"` @@ -1180,6 +1558,28 @@ func (s IncreaseStreamRetentionPeriodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *IncreaseStreamRetentionPeriodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IncreaseStreamRetentionPeriodInput"} + if s.RetentionPeriodHours == nil { + invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours")) + } + if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 24 { + invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 24)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type IncreaseStreamRetentionPeriodOutput struct { _ struct{} `type:"structure"` } @@ -1215,6 +1615,22 @@ func (s ListStreamsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"} + if s.ExclusiveStartStreamName != nil && len(*s.ExclusiveStartStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output for ListStreams. type ListStreamsOutput struct { _ struct{} `type:"structure"` @@ -1264,6 +1680,28 @@ func (s ListTagsForStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForStreamInput"} + if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output for ListTagsForStream. type ListTagsForStreamOutput struct { _ struct{} `type:"structure"` @@ -1311,6 +1749,34 @@ func (s MergeShardsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *MergeShardsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MergeShardsInput"} + if s.AdjacentShardToMerge == nil { + invalidParams.Add(request.NewErrParamRequired("AdjacentShardToMerge")) + } + if s.AdjacentShardToMerge != nil && len(*s.AdjacentShardToMerge) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AdjacentShardToMerge", 1)) + } + if s.ShardToMerge == nil { + invalidParams.Add(request.NewErrParamRequired("ShardToMerge")) + } + if s.ShardToMerge != nil && len(*s.ShardToMerge) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ShardToMerge", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type MergeShardsOutput struct { _ struct{} `type:"structure"` } @@ -1347,8 +1813,8 @@ type PutRecordInput struct { // that maps the partition key and associated data to a specific shard. Specifically, // an MD5 hash function is used to map partition keys to 128-bit integer values // and to map associated data records to shards. As a result of this hashing - // mechanism, all data records with the same partition key will map to the same - // shard within the stream. + // mechanism, all data records with the same partition key map to the same shard + // within the stream. PartitionKey *string `min:"1" type:"string" required:"true"` // Guarantees strictly increasing sequence numbers, for puts from the same client @@ -1372,6 +1838,31 @@ func (s PutRecordInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRecordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"} + if s.Data == nil { + invalidParams.Add(request.NewErrParamRequired("Data")) + } + if s.PartitionKey == nil { + invalidParams.Add(request.NewErrParamRequired("PartitionKey")) + } + if s.PartitionKey != nil && len(*s.PartitionKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the output for PutRecord. type PutRecordOutput struct { _ struct{} `type:"structure"` @@ -1417,6 +1908,38 @@ func (s PutRecordsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRecordsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRecordsInput"} + if s.Records == nil { + invalidParams.Add(request.NewErrParamRequired("Records")) + } + if s.Records != nil && len(s.Records) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Records", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + if s.Records != nil { + for i, v := range s.Records { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // PutRecords results. type PutRecordsOutput struct { _ struct{} `type:"structure"` @@ -1426,9 +1949,9 @@ type PutRecordsOutput struct { // An array of successfully and unsuccessfully processed record results, correlated // with the request by natural ordering. A record that is successfully added - // to your Amazon Kinesis stream includes SequenceNumber and ShardId in the - // result. A record that fails to be added to your Amazon Kinesis stream includes - // ErrorCode and ErrorMessage in the result. + // to a stream includes SequenceNumber and ShardId in the result. A record that + // fails to be added to a stream includes ErrorCode and ErrorMessage in the + // result. Records []*PutRecordsResultEntry `min:"1" type:"list" required:"true"` } @@ -1479,11 +2002,29 @@ func (s PutRecordsRequestEntry) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRecordsRequestEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRecordsRequestEntry"} + if s.Data == nil { + invalidParams.Add(request.NewErrParamRequired("Data")) + } + if s.PartitionKey == nil { + invalidParams.Add(request.NewErrParamRequired("PartitionKey")) + } + if s.PartitionKey != nil && len(*s.PartitionKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Represents the result of an individual record from a PutRecords request. -// A record that is successfully added to your Amazon Kinesis stream includes -// SequenceNumber and ShardId in the result. A record that fails to be added -// to your Amazon Kinesis stream includes ErrorCode and ErrorMessage in the -// result. +// A record that is successfully added to a stream includes SequenceNumber and +// ShardId in the result. A record that fails to be added to the stream includes +// ErrorCode and ErrorMessage in the result. type PutRecordsResultEntry struct { _ struct{} `type:"structure"` @@ -1569,6 +2110,28 @@ func (s RemoveTagsFromStreamInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsFromStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromStreamInput"} + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.TagKeys != nil && len(s.TagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveTagsFromStreamOutput struct { _ struct{} `type:"structure"` } @@ -1609,20 +2172,20 @@ func (s SequenceNumberRange) GoString() string { type Shard struct { _ struct{} `type:"structure"` - // The shard Id of the shard adjacent to the shard's parent. + // The shard ID of the shard adjacent to the shard's parent. AdjacentParentShardId *string `min:"1" type:"string"` // The range of possible hash key values for the shard, which is a set of ordered // contiguous positive integers. HashKeyRange *HashKeyRange `type:"structure" required:"true"` - // The shard Id of the shard's parent. + // The shard ID of the shard's parent. ParentShardId *string `min:"1" type:"string"` // The range of possible sequence numbers for the shard. SequenceNumberRange *SequenceNumberRange `type:"structure" required:"true"` - // The unique identifier of the shard within the Amazon Kinesis stream. + // The unique identifier of the shard within the stream. ShardId *string `min:"1" type:"string" required:"true"` } @@ -1666,6 +2229,31 @@ func (s SplitShardInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SplitShardInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SplitShardInput"} + if s.NewStartingHashKey == nil { + invalidParams.Add(request.NewErrParamRequired("NewStartingHashKey")) + } + if s.ShardToSplit == nil { + invalidParams.Add(request.NewErrParamRequired("ShardToSplit")) + } + if s.ShardToSplit != nil && len(*s.ShardToSplit) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ShardToSplit", 1)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SplitShardOutput struct { _ struct{} `type:"structure"` } @@ -1684,6 +2272,9 @@ func (s SplitShardOutput) GoString() string { type StreamDescription struct { _ struct{} `type:"structure"` + // Represents the current enhanced monitoring settings of the stream. + EnhancedMonitoring []*EnhancedMetrics `type:"list" required:"true"` + // If set to true, more shards in the stream are available to describe. HasMoreShards *bool `type:"boolean" required:"true"` @@ -1699,16 +2290,15 @@ type StreamDescription struct { // The name of the stream being described. StreamName *string `min:"1" type:"string" required:"true"` - // The current status of the stream being described. + // The current status of the stream being described. The stream status is one + // of the following states: // - // The stream status is one of the following states: - // - // CREATING - The stream is being created. Amazon Kinesis immediately returns - // and sets StreamStatus to CREATING. DELETING - The stream is being deleted. + // CREATING - The stream is being created. Amazon Kinesis immediately returns + // and sets StreamStatus to CREATING. DELETING - The stream is being deleted. // The specified stream is in the DELETING state until Amazon Kinesis completes - // the deletion. ACTIVE - The stream exists and is ready for read and write + // the deletion. ACTIVE - The stream exists and is ready for read and write // operations or deletion. You should perform read and write operations only - // on an ACTIVE stream. UPDATING - Shards in the stream are being merged or + // on an ACTIVE stream. UPDATING - Shards in the stream are being merged or // split. Read and write operations continue to work while the stream is in // the UPDATING state. StreamStatus *string `type:"string" required:"true" enum:"StreamStatus"` @@ -1748,6 +2338,25 @@ func (s Tag) GoString() string { return s.String() } +const ( + // @enum MetricsName + MetricsNameIncomingBytes = "IncomingBytes" + // @enum MetricsName + MetricsNameIncomingRecords = "IncomingRecords" + // @enum MetricsName + MetricsNameOutgoingBytes = "OutgoingBytes" + // @enum MetricsName + MetricsNameOutgoingRecords = "OutgoingRecords" + // @enum MetricsName + MetricsNameWriteProvisionedThroughputExceeded = "WriteProvisionedThroughputExceeded" + // @enum MetricsName + MetricsNameReadProvisionedThroughputExceeded = "ReadProvisionedThroughputExceeded" + // @enum MetricsName + MetricsNameIteratorAgeMilliseconds = "IteratorAgeMilliseconds" + // @enum MetricsName + MetricsNameAll = "ALL" +) + const ( // @enum ShardIteratorType ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER" @@ -1757,6 +2366,8 @@ const ( ShardIteratorTypeTrimHorizon = "TRIM_HORIZON" // @enum ShardIteratorType ShardIteratorTypeLatest = "LATEST" + // @enum ShardIteratorType + ShardIteratorTypeAtTimestamp = "AT_TIMESTAMP" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go index ca728dc2f..687b7466b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go @@ -11,8 +11,8 @@ import ( "github.com/aws/aws-sdk-go/private/signer/v4" ) -// Amazon Kinesis is a managed service that scales elastically for real time -// processing of streaming big data. +// Amazon Kinesis Streams is a managed service that scales elastically for real +// time processing of streaming big data. //The service client's operations are safe to be used concurrently. // It is not safe to mutate any of the client's properties though. type Kinesis struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index 5d40a89f6..3caa3a83f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -1063,6 +1063,22 @@ func (s CancelKeyDeletionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelKeyDeletionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelKeyDeletionInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CancelKeyDeletionOutput struct { _ struct{} `type:"structure"` @@ -1105,6 +1121,28 @@ func (s CreateAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} + if s.AliasName == nil { + invalidParams.Add(request.NewErrParamRequired("AliasName")) + } + if s.AliasName != nil && len(*s.AliasName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AliasName", 1)) + } + if s.TargetKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetKeyId")) + } + if s.TargetKeyId != nil && len(*s.TargetKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetKeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateAliasOutput struct { _ struct{} `type:"structure"` } @@ -1196,6 +1234,34 @@ func (s CreateGrantInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGrantInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGrantInput"} + if s.GranteePrincipal == nil { + invalidParams.Add(request.NewErrParamRequired("GranteePrincipal")) + } + if s.GranteePrincipal != nil && len(*s.GranteePrincipal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GranteePrincipal", 1)) + } + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RetiringPrincipal != nil && len(*s.RetiringPrincipal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RetiringPrincipal", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateGrantOutput struct { _ struct{} `type:"structure"` @@ -1247,6 +1313,19 @@ func (s CreateKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateKeyInput"} + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateKeyOutput struct { _ struct{} `type:"structure"` @@ -1294,6 +1373,22 @@ func (s DecryptInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DecryptInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecryptInput"} + if s.CiphertextBlob == nil { + invalidParams.Add(request.NewErrParamRequired("CiphertextBlob")) + } + if s.CiphertextBlob != nil && len(s.CiphertextBlob) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CiphertextBlob", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DecryptOutput struct { _ struct{} `type:"structure"` @@ -1336,6 +1431,22 @@ func (s DeleteAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"} + if s.AliasName == nil { + invalidParams.Add(request.NewErrParamRequired("AliasName")) + } + if s.AliasName != nil && len(*s.AliasName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AliasName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAliasOutput struct { _ struct{} `type:"structure"` } @@ -1378,6 +1489,22 @@ func (s DescribeKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeKeyInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeKeyOutput struct { _ struct{} `type:"structure"` @@ -1415,6 +1542,22 @@ func (s DisableKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableKeyInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableKeyOutput struct { _ struct{} `type:"structure"` } @@ -1449,6 +1592,22 @@ func (s DisableKeyRotationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableKeyRotationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableKeyRotationInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableKeyRotationOutput struct { _ struct{} `type:"structure"` } @@ -1483,6 +1642,22 @@ func (s EnableKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableKeyInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableKeyOutput struct { _ struct{} `type:"structure"` } @@ -1517,6 +1692,22 @@ func (s EnableKeyRotationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableKeyRotationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableKeyRotationInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableKeyRotationOutput struct { _ struct{} `type:"structure"` } @@ -1570,6 +1761,28 @@ func (s EncryptInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncryptInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.Plaintext == nil { + invalidParams.Add(request.NewErrParamRequired("Plaintext")) + } + if s.Plaintext != nil && len(s.Plaintext) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Plaintext", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EncryptOutput struct { _ struct{} `type:"structure"` @@ -1635,6 +1848,25 @@ func (s GenerateDataKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GenerateDataKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GenerateDataKeyOutput struct { _ struct{} `type:"structure"` @@ -1712,6 +1944,25 @@ func (s GenerateDataKeyWithoutPlaintextInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GenerateDataKeyWithoutPlaintextInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyWithoutPlaintextInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GenerateDataKeyWithoutPlaintextOutput struct { _ struct{} `type:"structure"` @@ -1757,6 +2008,19 @@ func (s GenerateRandomInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GenerateRandomInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GenerateRandomInput"} + if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GenerateRandomOutput struct { _ struct{} `type:"structure"` @@ -1800,6 +2064,28 @@ func (s GetKeyPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetKeyPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetKeyPolicyInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetKeyPolicyOutput struct { _ struct{} `type:"structure"` @@ -1837,6 +2123,22 @@ func (s GetKeyRotationStatusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetKeyRotationStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetKeyRotationStatusInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetKeyRotationStatusOutput struct { _ struct{} `type:"structure"` @@ -2022,8 +2324,8 @@ type ListAliasesInput struct { Limit *int64 `min:"1" type:"integer"` // Use this parameter only when paginating results and only in a subsequent - // request after you've received a response with truncated results. Set it to - // the value of NextMarker from the response you just received. + // request after you receive a response with truncated results. Set it to the + // value of NextMarker from the response you just received. Marker *string `min:"1" type:"string"` } @@ -2037,6 +2339,22 @@ func (s ListAliasesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAliasesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListAliasesOutput struct { _ struct{} `type:"structure"` @@ -2081,8 +2399,8 @@ type ListGrantsInput struct { Limit *int64 `min:"1" type:"integer"` // Use this parameter only when paginating results and only in a subsequent - // request after you've received a response with truncated results. Set it to - // the value of NextMarker from the response you just received. + // request after you receive a response with truncated results. Set it to the + // value of NextMarker from the response you just received. Marker *string `min:"1" type:"string"` } @@ -2096,6 +2414,28 @@ func (s ListGrantsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGrantsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGrantsInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListGrantsResponse struct { _ struct{} `type:"structure"` @@ -2144,8 +2484,8 @@ type ListKeyPoliciesInput struct { Limit *int64 `min:"1" type:"integer"` // Use this parameter only when paginating results and only in a subsequent - // request after you've received a response with truncated results. Set it to - // the value of NextMarker from the response you just received. + // request after you receive a response with truncated results. Set it to the + // value of NextMarker from the response you just received. Marker *string `min:"1" type:"string"` } @@ -2159,6 +2499,28 @@ func (s ListKeyPoliciesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListKeyPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListKeyPoliciesInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListKeyPoliciesOutput struct { _ struct{} `type:"structure"` @@ -2198,8 +2560,8 @@ type ListKeysInput struct { Limit *int64 `min:"1" type:"integer"` // Use this parameter only when paginating results and only in a subsequent - // request after you've received a response with truncated results. Set it to - // the value of NextMarker from the response you just received. + // request after you receive a response with truncated results. Set it to the + // value of NextMarker from the response you just received. Marker *string `min:"1" type:"string"` } @@ -2213,6 +2575,22 @@ func (s ListKeysInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListKeysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListKeysInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListKeysOutput struct { _ struct{} `type:"structure"` @@ -2251,8 +2629,8 @@ type ListRetirableGrantsInput struct { Limit *int64 `min:"1" type:"integer"` // Use this parameter only when paginating results and only in a subsequent - // request after you've received a response with truncated results. Set it to - // the value of NextMarker from the response you just received. + // request after you receive a response with truncated results. Set it to the + // value of NextMarker from the response you just received. Marker *string `min:"1" type:"string"` // The retiring principal for which to list grants. @@ -2276,6 +2654,28 @@ func (s ListRetirableGrantsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRetirableGrantsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRetirableGrantsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.RetiringPrincipal == nil { + invalidParams.Add(request.NewErrParamRequired("RetiringPrincipal")) + } + if s.RetiringPrincipal != nil && len(*s.RetiringPrincipal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RetiringPrincipal", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutKeyPolicyInput struct { _ struct{} `type:"structure"` @@ -2305,6 +2705,34 @@ func (s PutKeyPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutKeyPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutKeyPolicyInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.Policy == nil { + invalidParams.Add(request.NewErrParamRequired("Policy")) + } + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutKeyPolicyOutput struct { _ struct{} `type:"structure"` } @@ -2360,6 +2788,28 @@ func (s ReEncryptInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReEncryptInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReEncryptInput"} + if s.CiphertextBlob == nil { + invalidParams.Add(request.NewErrParamRequired("CiphertextBlob")) + } + if s.CiphertextBlob != nil && len(s.CiphertextBlob) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CiphertextBlob", 1)) + } + if s.DestinationKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationKeyId")) + } + if s.DestinationKeyId != nil && len(*s.DestinationKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationKeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ReEncryptOutput struct { _ struct{} `type:"structure"` @@ -2413,6 +2863,25 @@ func (s RetireGrantInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetireGrantInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetireGrantInput"} + if s.GrantId != nil && len(*s.GrantId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GrantId", 1)) + } + if s.GrantToken != nil && len(*s.GrantToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GrantToken", 1)) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RetireGrantOutput struct { _ struct{} `type:"structure"` } @@ -2450,6 +2919,28 @@ func (s RevokeGrantInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeGrantInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeGrantInput"} + if s.GrantId == nil { + invalidParams.Add(request.NewErrParamRequired("GrantId")) + } + if s.GrantId != nil && len(*s.GrantId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GrantId", 1)) + } + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RevokeGrantOutput struct { _ struct{} `type:"structure"` } @@ -2496,6 +2987,25 @@ func (s ScheduleKeyDeletionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduleKeyDeletionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduleKeyDeletionInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.PendingWindowInDays != nil && *s.PendingWindowInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("PendingWindowInDays", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ScheduleKeyDeletionOutput struct { _ struct{} `type:"structure"` @@ -2545,6 +3055,28 @@ func (s UpdateAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"} + if s.AliasName == nil { + invalidParams.Add(request.NewErrParamRequired("AliasName")) + } + if s.AliasName != nil && len(*s.AliasName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AliasName", 1)) + } + if s.TargetKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetKeyId")) + } + if s.TargetKeyId != nil && len(*s.TargetKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetKeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateAliasOutput struct { _ struct{} `type:"structure"` } @@ -2582,6 +3114,25 @@ func (s UpdateKeyDescriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateKeyDescriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateKeyDescriptionInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateKeyDescriptionOutput struct { _ struct{} `type:"structure"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index 063f9b033..bc9375293 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -911,6 +911,8 @@ type AddPermissionInput struct { // permission for all AWS Lambda actions. Action *string `type:"string" required:"true"` + EventSourceToken *string `type:"string"` + // Name of the Lambda function whose resource policy you are updating by adding // a new permission. // @@ -981,6 +983,37 @@ func (s AddPermissionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddPermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Principal == nil { + invalidParams.Add(request.NewErrParamRequired("Principal")) + } + if s.Qualifier != nil && len(*s.Qualifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddPermissionOutput struct { _ struct{} `type:"structure"` @@ -1055,6 +1088,34 @@ func (s CreateAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.FunctionVersion == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionVersion")) + } + if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 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 +} + type CreateEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -1107,6 +1168,31 @@ func (s CreateEventSourceMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEventSourceMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEventSourceMappingInput"} + if s.BatchSize != nil && *s.BatchSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1)) + } + if s.EventSourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("EventSourceArn")) + } + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.StartingPosition == nil { + invalidParams.Add(request.NewErrParamRequired("StartingPosition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateFunctionInput struct { _ struct{} `type:"structure"` @@ -1170,6 +1256,45 @@ func (s CreateFunctionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"} + if s.Code == nil { + invalidParams.Add(request.NewErrParamRequired("Code")) + } + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Handler == nil { + invalidParams.Add(request.NewErrParamRequired("Handler")) + } + if s.MemorySize != nil && *s.MemorySize < 128 { + invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128)) + } + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.Runtime == nil { + invalidParams.Add(request.NewErrParamRequired("Runtime")) + } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + if s.Code != nil { + if err := s.Code.Validate(); err != nil { + invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAliasInput struct { _ struct{} `type:"structure"` @@ -1191,6 +1316,28 @@ func (s DeleteAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 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 +} + type DeleteAliasOutput struct { _ struct{} `type:"structure"` } @@ -1222,6 +1369,19 @@ func (s DeleteEventSourceMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventSourceMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventSourceMappingInput"} + if s.UUID == nil { + invalidParams.Add(request.NewErrParamRequired("UUID")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteFunctionInput struct { _ struct{} `type:"structure"` @@ -1263,6 +1423,25 @@ func (s DeleteFunctionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Qualifier != nil && len(*s.Qualifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteFunctionOutput struct { _ struct{} `type:"structure"` } @@ -1356,6 +1535,25 @@ func (s FunctionCode) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *FunctionCode) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FunctionCode"} + if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { + invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) + } + if s.S3Key != nil && len(*s.S3Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) + } + if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The object for the Lambda function location. type FunctionCodeLocation struct { _ struct{} `type:"structure"` @@ -1458,6 +1656,28 @@ func (s GetAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAliasInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 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 +} + type GetEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -1475,6 +1695,19 @@ func (s GetEventSourceMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEventSourceMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEventSourceMappingInput"} + if s.UUID == nil { + invalidParams.Add(request.NewErrParamRequired("UUID")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetFunctionConfigurationInput struct { _ struct{} `type:"structure"` @@ -1509,6 +1742,25 @@ func (s GetFunctionConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFunctionConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFunctionConfigurationInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Qualifier != nil && len(*s.Qualifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetFunctionInput struct { _ struct{} `type:"structure"` @@ -1541,6 +1793,25 @@ func (s GetFunctionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Qualifier != nil && len(*s.Qualifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // This response contains the object for the Lambda function location (see API_FunctionCodeLocation. type GetFunctionOutput struct { _ struct{} `type:"structure"` @@ -1594,6 +1865,25 @@ func (s GetPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Qualifier != nil && len(*s.Qualifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetPolicyOutput struct { _ struct{} `type:"structure"` @@ -1633,6 +1923,25 @@ func (s InvokeAsyncInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InvokeAsyncInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InvokeAsyncInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.InvokeArgs == nil { + invalidParams.Add(request.NewErrParamRequired("InvokeArgs")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Upon success, it returns empty response. Otherwise, throws an exception. type InvokeAsyncOutput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -1711,6 +2020,25 @@ func (s InvokeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *InvokeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InvokeInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Qualifier != nil && len(*s.Qualifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Upon success, returns an empty response. Otherwise, throws an exception. type InvokeOutput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -1783,6 +2111,28 @@ func (s ListAliasesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAliasesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListAliasesOutput struct { _ struct{} `type:"structure"` @@ -1841,6 +2191,22 @@ func (s ListEventSourceMappingsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEventSourceMappingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEventSourceMappingsInput"} + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains a list of event sources (see API_EventSourceMappingConfiguration) type ListEventSourceMappingsOutput struct { _ struct{} `type:"structure"` @@ -1884,6 +2250,19 @@ func (s ListFunctionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFunctionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"} + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains a list of AWS Lambda function configurations (see FunctionConfiguration. type ListFunctionsOutput struct { _ struct{} `type:"structure"` @@ -1935,6 +2314,25 @@ func (s ListVersionsByFunctionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVersionsByFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVersionsByFunctionInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListVersionsByFunctionOutput struct { _ struct{} `type:"structure"` @@ -1987,6 +2385,22 @@ func (s PublishVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PublishVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PublishVersionInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemovePermissionInput struct { _ struct{} `type:"structure"` @@ -2019,6 +2433,31 @@ func (s RemovePermissionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemovePermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.Qualifier != nil && len(*s.Qualifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemovePermissionOutput struct { _ struct{} `type:"structure"` } @@ -2060,6 +2499,31 @@ func (s UpdateAliasInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAliasInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 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 +} + type UpdateEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -2100,6 +2564,25 @@ func (s UpdateEventSourceMappingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEventSourceMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEventSourceMappingInput"} + if s.BatchSize != nil && *s.BatchSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1)) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.UUID == nil { + invalidParams.Add(request.NewErrParamRequired("UUID")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateFunctionCodeInput struct { _ struct{} `type:"structure"` @@ -2143,6 +2626,31 @@ func (s UpdateFunctionCodeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFunctionCodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionCodeInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { + invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) + } + if s.S3Key != nil && len(*s.S3Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) + } + if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateFunctionConfigurationInput struct { _ struct{} `type:"structure"` @@ -2175,6 +2683,8 @@ type UpdateFunctionConfigurationInput struct { // it executes your function. Role *string `type:"string"` + Runtime *string `type:"string" enum:"Runtime"` + // The function execution time at which AWS Lambda should terminate the function. // Because the execution time has cost implications, we recommend you set this // value based on your expected execution time. The default is 3 seconds. @@ -2197,6 +2707,28 @@ func (s UpdateFunctionConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFunctionConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionConfigurationInput"} + if s.FunctionName == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionName")) + } + if s.FunctionName != nil && len(*s.FunctionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) + } + if s.MemorySize != nil && *s.MemorySize < 128 { + invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128)) + } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // If your Lambda function accesses resources in a VPC, you provide this parameter // identifying the list of security group IDs and subnet IDs. These must belong // to the same VPC. You must provide at least one security group and one subnet @@ -2272,6 +2804,8 @@ const ( // @enum Runtime RuntimeNodejs = "nodejs" // @enum Runtime + RuntimeNodejs43 = "nodejs4.3" + // @enum Runtime RuntimeJava8 = "java8" // @enum Runtime RuntimePython27 = "python2.7" diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go index cf1cda6e4..ec5fcdbe2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go @@ -4,6 +4,8 @@ package opsworks import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" @@ -2534,6 +2536,22 @@ func (s AssignInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssignInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssignInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.LayerIds == nil { + invalidParams.Add(request.NewErrParamRequired("LayerIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AssignInstanceOutput struct { _ struct{} `type:"structure"` } @@ -2568,6 +2586,19 @@ func (s AssignVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssignVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssignVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AssignVolumeOutput struct { _ struct{} `type:"structure"` } @@ -2602,6 +2633,19 @@ func (s AssociateElasticIpInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateElasticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateElasticIpInput"} + if s.ElasticIp == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticIp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AssociateElasticIpOutput struct { _ struct{} `type:"structure"` } @@ -2637,6 +2681,22 @@ func (s AttachElasticLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachElasticLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachElasticLoadBalancerInput"} + if s.ElasticLoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticLoadBalancerName")) + } + if s.LayerId == nil { + invalidParams.Add(request.NewErrParamRequired("LayerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AttachElasticLoadBalancerOutput struct { _ struct{} `type:"structure"` } @@ -2706,6 +2766,22 @@ func (s AutoScalingThresholds) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AutoScalingThresholds) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AutoScalingThresholds"} + if s.IgnoreMetricsTime != nil && *s.IgnoreMetricsTime < 1 { + invalidParams.Add(request.NewErrParamMinValue("IgnoreMetricsTime", 1)) + } + if s.ThresholdsWaitTime != nil && *s.ThresholdsWaitTime < 1 { + invalidParams.Add(request.NewErrParamMinValue("ThresholdsWaitTime", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a block device mapping. This data type maps directly to the Amazon // EC2 BlockDeviceMapping (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html) // data type. @@ -2949,6 +3025,22 @@ func (s CloneStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloneStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloneStackInput"} + if s.ServiceRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) + } + if s.SourceStackId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceStackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a CloneStack request. type CloneStackOutput struct { _ struct{} `type:"structure"` @@ -3085,6 +3177,40 @@ func (s CreateAppInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAppInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Environment != nil { + for i, v := range s.Environment { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Environment", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SslConfiguration != nil { + if err := s.SslConfiguration.Validate(); err != nil { + invalidParams.AddNested("SslConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a CreateApp request. type CreateAppOutput struct { _ struct{} `type:"structure"` @@ -3130,6 +3256,9 @@ type CreateDeploymentInput struct { // The instance IDs for the deployment targets. InstanceIds []*string `type:"list"` + // The layer IDs for the deployment targets. + LayerIds []*string `type:"list"` + // The stack ID. StackId *string `type:"string" required:"true"` } @@ -3144,6 +3273,27 @@ func (s CreateDeploymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentInput"} + if s.Command == nil { + invalidParams.Add(request.NewErrParamRequired("Command")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + if s.Command != nil { + if err := s.Command.Validate(); err != nil { + invalidParams.AddNested("Command", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a CreateDeployment request. type CreateDeploymentOutput struct { _ struct{} `type:"structure"` @@ -3262,6 +3412,18 @@ type CreateInstanceInput struct { // AWS OpsWorks to launch the instance in a different subnet. SubnetId *string `type:"string"` + // The instance's tenancy option. The default option is no tenancy, or if the + // instance is running in a VPC, inherit tenancy settings from the VPC. The + // following are valid values for this parameter: dedicated, default, or host. + // Because there are costs associated with changes in tenancy options, we recommend + // that you research tenancy options before choosing them for your instances. + // For more information about dedicated hosts, see Dedicated Hosts Overview + // (https://aws.amazon.com/ec2/dedicated-hosts/) and Amazon EC2 Dedicated Hosts + // (https://aws.amazon.com/ec2/dedicated-hosts/). For more information about + // dedicated instances, see Dedicated Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/dedicated-instance.html) + // and Amazon EC2 Dedicated Instances (https://aws.amazon.com/ec2/purchasing-options/dedicated-instances/). + Tenancy *string `type:"string"` + // The instance's virtualization type, paravirtual or hvm. VirtualizationType *string `type:"string"` } @@ -3276,6 +3438,25 @@ func (s CreateInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceInput"} + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.LayerIds == nil { + invalidParams.Add(request.NewErrParamRequired("LayerIds")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a CreateInstance request. type CreateInstanceOutput struct { _ struct{} `type:"structure"` @@ -3386,6 +3567,38 @@ func (s CreateLayerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLayerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLayerInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Shortname == nil { + invalidParams.Add(request.NewErrParamRequired("Shortname")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.VolumeConfigurations != nil { + for i, v := range s.VolumeConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VolumeConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a CreateLayer request. type CreateLayerOutput struct { _ struct{} `type:"structure"` @@ -3579,6 +3792,28 @@ func (s CreateStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStackInput"} + if s.DefaultInstanceProfileArn == nil { + invalidParams.Add(request.NewErrParamRequired("DefaultInstanceProfileArn")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Region == nil { + invalidParams.Add(request.NewErrParamRequired("Region")) + } + if s.ServiceRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a CreateStack request. type CreateStackOutput struct { _ struct{} `type:"structure"` @@ -3629,6 +3864,19 @@ func (s CreateUserProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateUserProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateUserProfileInput"} + if s.IamUserArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamUserArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a CreateUserProfile request. type CreateUserProfileOutput struct { _ struct{} `type:"structure"` @@ -3689,6 +3937,19 @@ func (s DeleteAppInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAppInput"} + if s.AppId == nil { + invalidParams.Add(request.NewErrParamRequired("AppId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteAppOutput struct { _ struct{} `type:"structure"` } @@ -3726,6 +3987,19 @@ func (s DeleteInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteInstanceOutput struct { _ struct{} `type:"structure"` } @@ -3757,6 +4031,19 @@ func (s DeleteLayerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLayerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLayerInput"} + if s.LayerId == nil { + invalidParams.Add(request.NewErrParamRequired("LayerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteLayerOutput struct { _ struct{} `type:"structure"` } @@ -3788,6 +4075,19 @@ func (s DeleteStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStackInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteStackOutput struct { _ struct{} `type:"structure"` } @@ -3819,6 +4119,19 @@ func (s DeleteUserProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserProfileInput"} + if s.IamUserArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamUserArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteUserProfileOutput struct { _ struct{} `type:"structure"` } @@ -3952,6 +4265,19 @@ func (s DeploymentCommand) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeploymentCommand) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeploymentCommand"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterEcsClusterInput struct { _ struct{} `type:"structure"` @@ -3969,6 +4295,19 @@ func (s DeregisterEcsClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterEcsClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterEcsClusterInput"} + if s.EcsClusterArn == nil { + invalidParams.Add(request.NewErrParamRequired("EcsClusterArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterEcsClusterOutput struct { _ struct{} `type:"structure"` } @@ -4000,6 +4339,19 @@ func (s DeregisterElasticIpInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterElasticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterElasticIpInput"} + if s.ElasticIp == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticIp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterElasticIpOutput struct { _ struct{} `type:"structure"` } @@ -4031,6 +4383,19 @@ func (s DeregisterInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterInstanceOutput struct { _ struct{} `type:"structure"` } @@ -4062,6 +4427,19 @@ func (s DeregisterRdsDbInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterRdsDbInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterRdsDbInstanceInput"} + if s.RdsDbInstanceArn == nil { + invalidParams.Add(request.NewErrParamRequired("RdsDbInstanceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterRdsDbInstanceOutput struct { _ struct{} `type:"structure"` } @@ -4095,6 +4473,19 @@ func (s DeregisterVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeregisterVolumeOutput struct { _ struct{} `type:"structure"` } @@ -4526,6 +4917,19 @@ func (s DescribeLoadBasedAutoScalingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLoadBasedAutoScalingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBasedAutoScalingInput"} + if s.LayerIds == nil { + invalidParams.Add(request.NewErrParamRequired("LayerIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a DescribeLoadBasedAutoScaling request. type DescribeLoadBasedAutoScalingOutput struct { _ struct{} `type:"structure"` @@ -4688,6 +5092,19 @@ func (s DescribeRdsDbInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRdsDbInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRdsDbInstancesInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a DescribeRdsDbInstances request. type DescribeRdsDbInstancesOutput struct { _ struct{} `type:"structure"` @@ -4768,6 +5185,19 @@ func (s DescribeStackProvisioningParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStackProvisioningParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStackProvisioningParametersInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a DescribeStackProvisioningParameters request. type DescribeStackProvisioningParametersOutput struct { _ struct{} `type:"structure"` @@ -4806,6 +5236,19 @@ func (s DescribeStackSummaryInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStackSummaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStackSummaryInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a DescribeStackSummary request. type DescribeStackSummaryOutput struct { _ struct{} `type:"structure"` @@ -4877,6 +5320,19 @@ func (s DescribeTimeBasedAutoScalingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTimeBasedAutoScalingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTimeBasedAutoScalingInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a DescribeTimeBasedAutoScaling request. type DescribeTimeBasedAutoScalingOutput struct { _ struct{} `type:"structure"` @@ -5000,6 +5456,22 @@ func (s DetachElasticLoadBalancerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachElasticLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachElasticLoadBalancerInput"} + if s.ElasticLoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticLoadBalancerName")) + } + if s.LayerId == nil { + invalidParams.Add(request.NewErrParamRequired("LayerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DetachElasticLoadBalancerOutput struct { _ struct{} `type:"structure"` } @@ -5031,6 +5503,19 @@ func (s DisassociateElasticIpInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateElasticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateElasticIpInput"} + if s.ElasticIp == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticIp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisassociateElasticIpOutput struct { _ struct{} `type:"structure"` } @@ -5211,6 +5696,22 @@ func (s EnvironmentVariable) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnvironmentVariable) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnvironmentVariable"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetHostnameSuggestionInput struct { _ struct{} `type:"structure"` @@ -5228,6 +5729,19 @@ func (s GetHostnameSuggestionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetHostnameSuggestionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetHostnameSuggestionInput"} + if s.LayerId == nil { + invalidParams.Add(request.NewErrParamRequired("LayerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a GetHostnameSuggestion request. type GetHostnameSuggestionOutput struct { _ struct{} `type:"structure"` @@ -5272,6 +5786,22 @@ func (s GrantAccessInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GrantAccessInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GrantAccessInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.ValidForInMinutes != nil && *s.ValidForInMinutes < 60 { + invalidParams.Add(request.NewErrParamMinValue("ValidForInMinutes", 60)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a GrantAccess request. type GrantAccessOutput struct { _ struct{} `type:"structure"` @@ -5426,6 +5956,9 @@ type Instance struct { // The instance's subnet ID; applicable only if the stack is running in a VPC. SubnetId *string `type:"string"` + // The instance's tenancy option, such as dedicated or host. + Tenancy *string `type:"string"` + // The instance's virtualization type: paravirtual or hvm. VirtualizationType *string `type:"string" enum:"VirtualizationType"` } @@ -5837,6 +6370,19 @@ func (s RebootInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RebootInstanceOutput struct { _ struct{} `type:"structure"` } @@ -5911,6 +6457,22 @@ func (s RegisterEcsClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterEcsClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterEcsClusterInput"} + if s.EcsClusterArn == nil { + invalidParams.Add(request.NewErrParamRequired("EcsClusterArn")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a RegisterEcsCluster request. type RegisterEcsClusterOutput struct { _ struct{} `type:"structure"` @@ -5949,6 +6511,22 @@ func (s RegisterElasticIpInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterElasticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterElasticIpInput"} + if s.ElasticIp == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticIp")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a RegisterElasticIp request. type RegisterElasticIpOutput struct { _ struct{} `type:"structure"` @@ -6003,6 +6581,19 @@ func (s RegisterInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterInstanceInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a RegisterInstanceResult request. type RegisterInstanceOutput struct { _ struct{} `type:"structure"` @@ -6047,6 +6638,28 @@ func (s RegisterRdsDbInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterRdsDbInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterRdsDbInstanceInput"} + if s.DbPassword == nil { + invalidParams.Add(request.NewErrParamRequired("DbPassword")) + } + if s.DbUser == nil { + invalidParams.Add(request.NewErrParamRequired("DbUser")) + } + if s.RdsDbInstanceArn == nil { + invalidParams.Add(request.NewErrParamRequired("RdsDbInstanceArn")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RegisterRdsDbInstanceOutput struct { _ struct{} `type:"structure"` } @@ -6081,6 +6694,19 @@ func (s RegisterVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterVolumeInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the response to a RegisterVolume request. type RegisterVolumeOutput struct { _ struct{} `type:"structure"` @@ -6213,6 +6839,29 @@ func (s SetLoadBasedAutoScalingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetLoadBasedAutoScalingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetLoadBasedAutoScalingInput"} + if s.LayerId == nil { + invalidParams.Add(request.NewErrParamRequired("LayerId")) + } + if s.DownScaling != nil { + if err := s.DownScaling.Validate(); err != nil { + invalidParams.AddNested("DownScaling", err.(request.ErrInvalidParams)) + } + } + if s.UpScaling != nil { + if err := s.UpScaling.Validate(); err != nil { + invalidParams.AddNested("UpScaling", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetLoadBasedAutoScalingOutput struct { _ struct{} `type:"structure"` } @@ -6260,6 +6909,22 @@ func (s SetPermissionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetPermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetPermissionInput"} + if s.IamUserArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamUserArn")) + } + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetPermissionOutput struct { _ struct{} `type:"structure"` } @@ -6294,6 +6959,19 @@ func (s SetTimeBasedAutoScalingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetTimeBasedAutoScalingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetTimeBasedAutoScalingInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetTimeBasedAutoScalingOutput struct { _ struct{} `type:"structure"` } @@ -6408,6 +7086,22 @@ func (s SslConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SslConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SslConfiguration"} + if s.Certificate == nil { + invalidParams.Add(request.NewErrParamRequired("Certificate")) + } + if s.PrivateKey == nil { + invalidParams.Add(request.NewErrParamRequired("PrivateKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a stack. type Stack struct { _ struct{} `type:"structure"` @@ -6583,6 +7277,19 @@ func (s StartInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type StartInstanceOutput struct { _ struct{} `type:"structure"` } @@ -6614,6 +7321,19 @@ func (s StartStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartStackInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type StartStackOutput struct { _ struct{} `type:"structure"` } @@ -6645,6 +7365,19 @@ func (s StopInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type StopInstanceOutput struct { _ struct{} `type:"structure"` } @@ -6676,6 +7409,19 @@ func (s StopStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopStackInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type StopStackOutput struct { _ struct{} `type:"structure"` } @@ -6759,6 +7505,19 @@ func (s UnassignInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnassignInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnassignInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UnassignInstanceOutput struct { _ struct{} `type:"structure"` } @@ -6790,6 +7549,19 @@ func (s UnassignVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnassignVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnassignVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UnassignVolumeOutput struct { _ struct{} `type:"structure"` } @@ -6865,6 +7637,34 @@ func (s UpdateAppInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAppInput"} + if s.AppId == nil { + invalidParams.Add(request.NewErrParamRequired("AppId")) + } + if s.Environment != nil { + for i, v := range s.Environment { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Environment", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SslConfiguration != nil { + if err := s.SslConfiguration.Validate(); err != nil { + invalidParams.AddNested("SslConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateAppOutput struct { _ struct{} `type:"structure"` } @@ -6899,6 +7699,19 @@ func (s UpdateElasticIpInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateElasticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateElasticIpInput"} + if s.ElasticIp == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticIp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateElasticIpOutput struct { _ struct{} `type:"structure"` } @@ -7007,6 +7820,19 @@ func (s UpdateInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateInstanceOutput struct { _ struct{} `type:"structure"` } @@ -7102,6 +7928,29 @@ func (s UpdateLayerInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLayerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLayerInput"} + if s.LayerId == nil { + invalidParams.Add(request.NewErrParamRequired("LayerId")) + } + if s.VolumeConfigurations != nil { + for i, v := range s.VolumeConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VolumeConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateLayerOutput struct { _ struct{} `type:"structure"` } @@ -7170,6 +8019,19 @@ func (s UpdateRdsDbInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRdsDbInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRdsDbInstanceInput"} + if s.RdsDbInstanceArn == nil { + invalidParams.Add(request.NewErrParamRequired("RdsDbInstanceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateRdsDbInstanceOutput struct { _ struct{} `type:"structure"` } @@ -7329,6 +8191,19 @@ func (s UpdateStackInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateStackInput"} + if s.StackId == nil { + invalidParams.Add(request.NewErrParamRequired("StackId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateStackOutput struct { _ struct{} `type:"structure"` } @@ -7374,6 +8249,19 @@ func (s UpdateUserProfileInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateUserProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateUserProfileInput"} + if s.IamUserArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamUserArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateUserProfileOutput struct { _ struct{} `type:"structure"` } @@ -7411,6 +8299,19 @@ func (s UpdateVolumeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateVolumeOutput struct { _ struct{} `type:"structure"` } @@ -7476,7 +8377,7 @@ type Volume struct { // For PIOPS volumes, the IOPS per disk. Iops *int64 `type:"integer"` - // The volume mount point. For example "/dev/sdh". + // The volume mount point. For example, "/mnt/disk1". MountPoint *string `type:"string"` // The volume name. @@ -7548,6 +8449,25 @@ func (s VolumeConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *VolumeConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VolumeConfiguration"} + if s.MountPoint == nil { + invalidParams.Add(request.NewErrParamRequired("MountPoint")) + } + if s.NumberOfDisks == nil { + invalidParams.Add(request.NewErrParamRequired("NumberOfDisks")) + } + if s.Size == nil { + invalidParams.Add(request.NewErrParamRequired("Size")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes a time-based instance's auto scaling schedule. The schedule consists // of a set of key-value pairs. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 422b5f547..12440c395 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -4,6 +4,7 @@ package rds import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -2794,6 +2795,22 @@ func (s AddSourceIdentifierToSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddSourceIdentifierToSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddSourceIdentifierToSubscriptionInput"} + if s.SourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) + } + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddSourceIdentifierToSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -2834,6 +2851,22 @@ func (s AddTagsToResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddTagsToResourceOutput struct { _ struct{} `type:"structure"` } @@ -2882,6 +2915,25 @@ func (s ApplyPendingMaintenanceActionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplyPendingMaintenanceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplyPendingMaintenanceActionInput"} + if s.ApplyAction == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyAction")) + } + if s.OptInType == nil { + invalidParams.Add(request.NewErrParamRequired("OptInType")) + } + if s.ResourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ApplyPendingMaintenanceActionOutput struct { _ struct{} `type:"structure"` @@ -2936,6 +2988,19 @@ func (s AuthorizeDBSecurityGroupIngressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeDBSecurityGroupIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeDBSecurityGroupIngressInput"} + if s.DBSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AuthorizeDBSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` @@ -3065,6 +3130,22 @@ func (s CopyDBClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterSnapshotInput"} + if s.SourceDBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterSnapshotIdentifier")) + } + if s.TargetDBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CopyDBClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -3127,6 +3208,25 @@ func (s CopyDBParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBParameterGroupInput"} + if s.SourceDBParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBParameterGroupIdentifier")) + } + if s.TargetDBParameterGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupDescription")) + } + if s.TargetDBParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CopyDBParameterGroupOutput struct { _ struct{} `type:"structure"` @@ -3212,6 +3312,22 @@ func (s CopyDBSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBSnapshotInput"} + if s.SourceDBSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBSnapshotIdentifier")) + } + if s.TargetDBSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CopyDBSnapshotOutput struct { _ struct{} `type:"structure"` @@ -3272,6 +3388,25 @@ func (s CopyOptionGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyOptionGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyOptionGroupInput"} + if s.SourceOptionGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceOptionGroupIdentifier")) + } + if s.TargetOptionGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("TargetOptionGroupDescription")) + } + if s.TargetOptionGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetOptionGroupIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CopyOptionGroupOutput struct { _ struct{} `type:"structure"` @@ -3443,6 +3578,28 @@ func (s CreateDBClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + if s.MasterUserPassword == nil { + invalidParams.Add(request.NewErrParamRequired("MasterUserPassword")) + } + if s.MasterUsername == nil { + invalidParams.Add(request.NewErrParamRequired("MasterUsername")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBClusterOutput struct { _ struct{} `type:"structure"` @@ -3499,6 +3656,25 @@ func (s CreateDBClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBClusterParameterGroupOutput struct { _ struct{} `type:"structure"` @@ -3558,6 +3734,22 @@ func (s CreateDBClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterSnapshotInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -4099,6 +4291,25 @@ func (s CreateDBInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceInput"} + if s.DBInstanceClass == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceClass")) + } + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBInstanceOutput struct { _ struct{} `type:"structure"` @@ -4264,6 +4475,22 @@ func (s CreateDBInstanceReadReplicaInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBInstanceReadReplicaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceReadReplicaInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.SourceDBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBInstanceReadReplicaOutput struct { _ struct{} `type:"structure"` @@ -4319,6 +4546,25 @@ func (s CreateDBParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBParameterGroupInput"} + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBParameterGroupOutput struct { _ struct{} `type:"structure"` @@ -4369,6 +4615,22 @@ func (s CreateDBSecurityGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBSecurityGroupInput"} + if s.DBSecurityGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupDescription")) + } + if s.DBSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -4424,6 +4686,22 @@ func (s CreateDBSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBSnapshotInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.DBSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBSnapshotOutput struct { _ struct{} `type:"structure"` @@ -4475,6 +4753,25 @@ func (s CreateDBSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBSubnetGroupInput"} + if s.DBSubnetGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupDescription")) + } + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateDBSubnetGroupOutput struct { _ struct{} `type:"structure"` @@ -4557,6 +4854,22 @@ func (s CreateEventSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEventSubscriptionInput"} + if s.SnsTopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) + } + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateEventSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -4612,6 +4925,28 @@ func (s CreateOptionGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateOptionGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateOptionGroupInput"} + if s.EngineName == nil { + invalidParams.Add(request.NewErrParamRequired("EngineName")) + } + if s.MajorEngineVersion == nil { + invalidParams.Add(request.NewErrParamRequired("MajorEngineVersion")) + } + if s.OptionGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("OptionGroupDescription")) + } + if s.OptionGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateOptionGroupOutput struct { _ struct{} `type:"structure"` @@ -5560,6 +5895,19 @@ func (s DeleteDBClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBClusterOutput struct { _ struct{} `type:"structure"` @@ -5604,6 +5952,19 @@ func (s DeleteDBClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBClusterParameterGroupOutput struct { _ struct{} `type:"structure"` } @@ -5638,6 +5999,19 @@ func (s DeleteDBClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterSnapshotInput"} + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -5706,6 +6080,19 @@ func (s DeleteDBInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBInstanceOutput struct { _ struct{} `type:"structure"` @@ -5748,6 +6135,19 @@ func (s DeleteDBParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBParameterGroupInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBParameterGroupOutput struct { _ struct{} `type:"structure"` } @@ -5785,6 +6185,19 @@ func (s DeleteDBSecurityGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBSecurityGroupInput"} + if s.DBSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBSecurityGroupOutput struct { _ struct{} `type:"structure"` } @@ -5819,6 +6232,19 @@ func (s DeleteDBSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBSnapshotInput"} + if s.DBSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBSnapshotOutput struct { _ struct{} `type:"structure"` @@ -5863,6 +6289,19 @@ func (s DeleteDBSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBSubnetGroupInput"} + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteDBSubnetGroupOutput struct { _ struct{} `type:"structure"` } @@ -5894,6 +6333,19 @@ func (s DeleteEventSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventSubscriptionInput"} + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteEventSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -5931,6 +6383,19 @@ func (s DeleteOptionGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteOptionGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteOptionGroupInput"} + if s.OptionGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteOptionGroupOutput struct { _ struct{} `type:"structure"` } @@ -6019,6 +6484,26 @@ func (s DescribeCertificatesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCertificatesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Data returned by the DescribeCertificates action. type DescribeCertificatesOutput struct { _ struct{} `type:"structure"` @@ -6081,6 +6566,26 @@ func (s DescribeDBClusterParameterGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterParameterGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParameterGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeDBClusterParameterGroupsOutput struct { _ struct{} `type:"structure"` @@ -6147,6 +6652,29 @@ func (s DescribeDBClusterParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParametersInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Provides details about a DB cluster parameter group including the parameters // in the DB cluster parameter group. type DescribeDBClusterParametersOutput struct { @@ -6229,6 +6757,26 @@ func (s DescribeDBClusterSnapshotsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterSnapshotsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Provides a list of DB cluster snapshots for the user as the result of a call // to the DescribeDBClusterSnapshots action. type DescribeDBClusterSnapshotsOutput struct { @@ -6294,6 +6842,26 @@ func (s DescribeDBClustersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClustersInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBClusters // action. type DescribeDBClustersOutput struct { @@ -6372,6 +6940,26 @@ func (s DescribeDBEngineVersionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBEngineVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBEngineVersionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBEngineVersions // action. type DescribeDBEngineVersionsOutput struct { @@ -6436,6 +7024,26 @@ func (s DescribeDBInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstancesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBInstances // action. type DescribeDBInstancesOutput struct { @@ -6531,6 +7139,29 @@ func (s DescribeDBLogFilesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBLogFilesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBLogFilesInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The response from a call to DescribeDBLogFiles. type DescribeDBLogFilesOutput struct { _ struct{} `type:"structure"` @@ -6591,6 +7222,26 @@ func (s DescribeDBParameterGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBParameterGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBParameterGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBParameterGroups // action. type DescribeDBParameterGroupsOutput struct { @@ -6661,6 +7312,29 @@ func (s DescribeDBParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBParametersInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBParameters // action. type DescribeDBParametersOutput struct { @@ -6719,6 +7393,26 @@ func (s DescribeDBSecurityGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBSecurityGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBSecurityGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBSecurityGroups // action. type DescribeDBSecurityGroupsOutput struct { @@ -6869,6 +7563,26 @@ func (s DescribeDBSnapshotsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBSnapshotsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBSnapshotsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBSnapshots // action. type DescribeDBSnapshotsOutput struct { @@ -6927,6 +7641,26 @@ func (s DescribeDBSubnetGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBSubnetGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBSubnetGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeDBSubnetGroups // action. type DescribeDBSubnetGroupsOutput struct { @@ -6986,6 +7720,29 @@ func (s DescribeEngineDefaultClusterParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEngineDefaultClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultClusterParametersInput"} + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeEngineDefaultClusterParametersOutput struct { _ struct{} `type:"structure"` @@ -7038,6 +7795,29 @@ func (s DescribeEngineDefaultParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEngineDefaultParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeEngineDefaultParametersOutput struct { _ struct{} `type:"structure"` @@ -7078,6 +7858,26 @@ func (s DescribeEventCategoriesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventCategoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventCategoriesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Data returned from the DescribeEventCategories action. type DescribeEventCategoriesOutput struct { _ struct{} `type:"structure"` @@ -7130,6 +7930,26 @@ func (s DescribeEventSubscriptionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventSubscriptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventSubscriptionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Data returned by the DescribeEventSubscriptions action. type DescribeEventSubscriptionsOutput struct { _ struct{} `type:"structure"` @@ -7224,6 +8044,26 @@ func (s DescribeEventsInput) 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.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeEvents action. type DescribeEventsOutput struct { _ struct{} `type:"structure"` @@ -7286,6 +8126,29 @@ func (s DescribeOptionGroupOptionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOptionGroupOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOptionGroupOptionsInput"} + if s.EngineName == nil { + invalidParams.Add(request.NewErrParamRequired("EngineName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeOptionGroupOptionsOutput struct { _ struct{} `type:"structure"` @@ -7352,6 +8215,26 @@ func (s DescribeOptionGroupsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOptionGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOptionGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // List of option groups. type DescribeOptionGroupsOutput struct { _ struct{} `type:"structure"` @@ -7425,6 +8308,29 @@ func (s DescribeOrderableDBInstanceOptionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOrderableDBInstanceOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOrderableDBInstanceOptionsInput"} + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeOrderableDBInstanceOptions // action. type DescribeOrderableDBInstanceOptionsOutput struct { @@ -7491,6 +8397,26 @@ func (s DescribePendingMaintenanceActionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePendingMaintenanceActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePendingMaintenanceActionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Data returned from the DescribePendingMaintenanceActions action. type DescribePendingMaintenanceActionsOutput struct { _ struct{} `type:"structure"` @@ -7577,6 +8503,26 @@ func (s DescribeReservedDBInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeReservedDBInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeReservedDBInstancesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeReservedDBInstancesOfferingsInput struct { _ struct{} `type:"structure"` @@ -7638,6 +8584,26 @@ func (s DescribeReservedDBInstancesOfferingsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeReservedDBInstancesOfferingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeReservedDBInstancesOfferingsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the result of a successful invocation of the DescribeReservedDBInstancesOfferings // action. type DescribeReservedDBInstancesOfferingsOutput struct { @@ -7768,6 +8734,22 @@ func (s DownloadDBLogFilePortionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DownloadDBLogFilePortionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DownloadDBLogFilePortionInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.LogFileName == nil { + invalidParams.Add(request.NewErrParamRequired("LogFileName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // This data type is used as a response element to DownloadDBLogFilePortion. type DownloadDBLogFilePortionOutput struct { _ struct{} `type:"structure"` @@ -8046,6 +9028,22 @@ func (s Filter) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // This data type is used as a response element in the DescribeDBSecurityGroups // action. type IPRange struct { @@ -8091,6 +9089,29 @@ 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.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` @@ -8229,6 +9250,19 @@ func (s ModifyDBClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyDBClusterOutput struct { _ struct{} `type:"structure"` @@ -8270,6 +9304,22 @@ func (s ModifyDBClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyDBInstanceInput struct { _ struct{} `type:"structure"` @@ -8722,6 +9772,19 @@ func (s ModifyDBInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyDBInstanceOutput struct { _ struct{} `type:"structure"` @@ -8777,6 +9840,22 @@ func (s ModifyDBParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBParameterGroupInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyDBSnapshotAttributeInput struct { _ struct{} `type:"structure"` @@ -8819,6 +9898,19 @@ func (s ModifyDBSnapshotAttributeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBSnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBSnapshotAttributeInput"} + if s.DBSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyDBSnapshotAttributeOutput struct { _ struct{} `type:"structure"` @@ -8869,6 +9961,22 @@ func (s ModifyDBSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBSubnetGroupInput"} + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyDBSubnetGroupOutput struct { _ struct{} `type:"structure"` @@ -8930,6 +10038,19 @@ func (s ModifyEventSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyEventSubscriptionInput"} + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyEventSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -8980,6 +10101,29 @@ func (s ModifyOptionGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyOptionGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyOptionGroupInput"} + if s.OptionGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) + } + if s.OptionsToInclude != nil { + for i, v := range s.OptionsToInclude { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OptionsToInclude", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyOptionGroupOutput struct { _ struct{} `type:"structure"` @@ -9067,6 +10211,19 @@ func (s OptionConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *OptionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OptionConfiguration"} + if s.OptionName == nil { + invalidParams.Add(request.NewErrParamRequired("OptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type OptionGroup struct { _ struct{} `type:"structure"` @@ -9519,6 +10676,19 @@ func (s PromoteReadReplicaInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PromoteReadReplicaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PromoteReadReplicaInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PromoteReadReplicaOutput struct { _ struct{} `type:"structure"` @@ -9571,6 +10741,19 @@ func (s PurchaseReservedDBInstancesOfferingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseReservedDBInstancesOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedDBInstancesOfferingInput"} + if s.ReservedDBInstancesOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedDBInstancesOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PurchaseReservedDBInstancesOfferingOutput struct { _ struct{} `type:"structure"` @@ -9617,6 +10800,19 @@ func (s RebootDBInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RebootDBInstanceOutput struct { _ struct{} `type:"structure"` @@ -9681,6 +10877,22 @@ func (s RemoveSourceIdentifierFromSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveSourceIdentifierFromSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveSourceIdentifierFromSubscriptionInput"} + if s.SourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) + } + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveSourceIdentifierFromSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -9721,6 +10933,22 @@ func (s RemoveTagsFromResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsFromResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemoveTagsFromResourceOutput struct { _ struct{} `type:"structure"` } @@ -9866,6 +11094,19 @@ func (s ResetDBClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ResetDBParameterGroupInput struct { _ struct{} `type:"structure"` @@ -9920,6 +11161,19 @@ func (s ResetDBParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetDBParameterGroupInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the pending maintenance actions for a resource. type ResourcePendingMaintenanceActions struct { _ struct{} `type:"structure"` @@ -10034,6 +11288,25 @@ func (s RestoreDBClusterFromSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBClusterFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterFromSnapshotInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreDBClusterFromSnapshotOutput struct { _ struct{} `type:"structure"` @@ -10151,6 +11424,22 @@ func (s RestoreDBClusterToPointInTimeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBClusterToPointInTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterToPointInTimeInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.SourceDBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreDBClusterToPointInTimeOutput struct { _ struct{} `type:"structure"` @@ -10338,6 +11627,22 @@ func (s RestoreDBInstanceFromDBSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBInstanceFromDBSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBInstanceFromDBSnapshotInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.DBSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreDBInstanceFromDBSnapshotOutput struct { _ struct{} `type:"structure"` @@ -10537,6 +11842,22 @@ func (s RestoreDBInstanceToPointInTimeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBInstanceToPointInTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBInstanceToPointInTimeInput"} + if s.SourceDBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBInstanceIdentifier")) + } + if s.TargetDBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreDBInstanceToPointInTimeOutput struct { _ struct{} `type:"structure"` @@ -10596,6 +11917,19 @@ func (s RevokeDBSecurityGroupIngressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeDBSecurityGroupIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeDBSecurityGroupIngressInput"} + if s.DBSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RevokeDBSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index 0a250ba95..97ff5ecfe 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -2365,6 +2365,19 @@ func (s AuthorizeClusterSecurityGroupIngressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeClusterSecurityGroupIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeClusterSecurityGroupIngressInput"} + if s.ClusterSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AuthorizeClusterSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` @@ -2408,6 +2421,22 @@ func (s AuthorizeSnapshotAccessInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeSnapshotAccessInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeSnapshotAccessInput"} + if s.AccountWithRestoreAccess == nil { + invalidParams.Add(request.NewErrParamRequired("AccountWithRestoreAccess")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AuthorizeSnapshotAccessOutput struct { _ struct{} `type:"structure"` @@ -2925,6 +2954,22 @@ func (s CopyClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyClusterSnapshotInput"} + if s.SourceSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotIdentifier")) + } + if s.TargetSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CopyClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -3180,6 +3225,28 @@ func (s CreateClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.MasterUserPassword == nil { + invalidParams.Add(request.NewErrParamRequired("MasterUserPassword")) + } + if s.MasterUsername == nil { + invalidParams.Add(request.NewErrParamRequired("MasterUsername")) + } + if s.NodeType == nil { + invalidParams.Add(request.NewErrParamRequired("NodeType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateClusterOutput struct { _ struct{} `type:"structure"` @@ -3238,6 +3305,25 @@ func (s CreateClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterParameterGroupInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.ParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupFamily")) + } + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateClusterParameterGroupOutput struct { _ struct{} `type:"structure"` @@ -3285,6 +3371,22 @@ func (s CreateClusterSecurityGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterSecurityGroupInput"} + if s.ClusterSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateClusterSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -3332,6 +3434,22 @@ func (s CreateClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterSnapshotInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -3383,6 +3501,25 @@ func (s CreateClusterSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterSubnetGroupInput"} + if s.ClusterSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterSubnetGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateClusterSubnetGroupOutput struct { _ struct{} `type:"structure"` @@ -3468,6 +3605,22 @@ func (s CreateEventSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEventSubscriptionInput"} + if s.SnsTopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) + } + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateEventSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -3506,6 +3659,19 @@ func (s CreateHsmClientCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHsmClientCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHsmClientCertificateInput"} + if s.HsmClientCertificateIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("HsmClientCertificateIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateHsmClientCertificateOutput struct { _ struct{} `type:"structure"` @@ -3562,6 +3728,34 @@ func (s CreateHsmConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHsmConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHsmConfigurationInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.HsmConfigurationIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("HsmConfigurationIdentifier")) + } + if s.HsmIpAddress == nil { + invalidParams.Add(request.NewErrParamRequired("HsmIpAddress")) + } + if s.HsmPartitionName == nil { + invalidParams.Add(request.NewErrParamRequired("HsmPartitionName")) + } + if s.HsmPartitionPassword == nil { + invalidParams.Add(request.NewErrParamRequired("HsmPartitionPassword")) + } + if s.HsmServerPublicCertificate == nil { + invalidParams.Add(request.NewErrParamRequired("HsmServerPublicCertificate")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateHsmConfigurationOutput struct { _ struct{} `type:"structure"` @@ -3614,6 +3808,19 @@ func (s CreateSnapshotCopyGrantInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotCopyGrantInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotCopyGrantInput"} + if s.SnapshotCopyGrantName == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotCopyGrantName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateSnapshotCopyGrantOutput struct { _ struct{} `type:"structure"` @@ -3663,6 +3870,22 @@ func (s CreateTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateTagsOutput struct { _ struct{} `type:"structure"` } @@ -3747,6 +3970,19 @@ func (s DeleteClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteClusterOutput struct { _ struct{} `type:"structure"` @@ -3786,6 +4022,19 @@ func (s DeleteClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterParameterGroupInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteClusterParameterGroupOutput struct { _ struct{} `type:"structure"` } @@ -3817,6 +4066,19 @@ func (s DeleteClusterSecurityGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSecurityGroupInput"} + if s.ClusterSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteClusterSecurityGroupOutput struct { _ struct{} `type:"structure"` } @@ -3858,6 +4120,19 @@ func (s DeleteClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSnapshotInput"} + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -3892,6 +4167,19 @@ func (s DeleteClusterSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSubnetGroupInput"} + if s.ClusterSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterSubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteClusterSubnetGroupOutput struct { _ struct{} `type:"structure"` } @@ -3923,6 +4211,19 @@ func (s DeleteEventSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventSubscriptionInput"} + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteEventSubscriptionOutput struct { _ struct{} `type:"structure"` } @@ -3954,6 +4255,19 @@ func (s DeleteHsmClientCertificateInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteHsmClientCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteHsmClientCertificateInput"} + if s.HsmClientCertificateIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("HsmClientCertificateIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteHsmClientCertificateOutput struct { _ struct{} `type:"structure"` } @@ -3985,6 +4299,19 @@ func (s DeleteHsmConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteHsmConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteHsmConfigurationInput"} + if s.HsmConfigurationIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("HsmConfigurationIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteHsmConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -4017,6 +4344,19 @@ func (s DeleteSnapshotCopyGrantInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotCopyGrantInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotCopyGrantInput"} + if s.SnapshotCopyGrantName == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotCopyGrantName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteSnapshotCopyGrantOutput struct { _ struct{} `type:"structure"` } @@ -4053,6 +4393,22 @@ func (s DeleteTagsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteTagsOutput struct { _ struct{} `type:"structure"` } @@ -4189,6 +4545,19 @@ func (s DescribeClusterParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClusterParametersInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Contains the output from the DescribeClusterParameters action. type DescribeClusterParametersOutput struct { _ struct{} `type:"structure"` @@ -4663,6 +5032,19 @@ func (s DescribeDefaultClusterParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDefaultClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDefaultClusterParametersInput"} + if s.ParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupFamily")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeDefaultClusterParametersOutput struct { _ struct{} `type:"structure"` @@ -5054,6 +5436,19 @@ func (s DescribeLoggingStatusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLoggingStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLoggingStatusInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DescribeOrderableClusterOptionsInput struct { _ struct{} `type:"structure"` @@ -5262,6 +5657,19 @@ func (s DescribeResizeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeResizeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeResizeInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Describes the result of a cluster resize operation. type DescribeResizeOutput struct { _ struct{} `type:"structure"` @@ -5572,6 +5980,19 @@ func (s DisableLoggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableLoggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableLoggingInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableSnapshotCopyInput struct { _ struct{} `type:"structure"` @@ -5593,6 +6014,19 @@ func (s DisableSnapshotCopyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableSnapshotCopyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableSnapshotCopyInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DisableSnapshotCopyOutput struct { _ struct{} `type:"structure"` @@ -5695,6 +6129,22 @@ func (s EnableLoggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableLoggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableLoggingInput"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableSnapshotCopyInput struct { _ struct{} `type:"structure"` @@ -5734,6 +6184,22 @@ func (s EnableSnapshotCopyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableSnapshotCopyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableSnapshotCopyInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.DestinationRegion == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationRegion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type EnableSnapshotCopyOutput struct { _ struct{} `type:"structure"` @@ -6102,6 +6568,19 @@ func (s ModifyClusterIamRolesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterIamRolesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterIamRolesInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyClusterIamRolesOutput struct { _ struct{} `type:"structure"` @@ -6300,6 +6779,19 @@ func (s ModifyClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyClusterOutput struct { _ struct{} `type:"structure"` @@ -6344,6 +6836,22 @@ func (s ModifyClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterParameterGroupInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyClusterSubnetGroupInput struct { _ struct{} `type:"structure"` @@ -6368,6 +6876,22 @@ func (s ModifyClusterSubnetGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterSubnetGroupInput"} + if s.ClusterSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyClusterSubnetGroupOutput struct { _ struct{} `type:"structure"` @@ -6443,6 +6967,19 @@ func (s ModifyEventSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyEventSubscriptionInput"} + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifyEventSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -6492,6 +7029,22 @@ func (s ModifySnapshotCopyRetentionPeriodInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifySnapshotCopyRetentionPeriodInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotCopyRetentionPeriodInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.RetentionPeriod == nil { + invalidParams.Add(request.NewErrParamRequired("RetentionPeriod")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ModifySnapshotCopyRetentionPeriodOutput struct { _ struct{} `type:"structure"` @@ -6647,6 +7200,19 @@ func (s PurchaseReservedNodeOfferingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseReservedNodeOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedNodeOfferingInput"} + if s.ReservedNodeOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedNodeOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PurchaseReservedNodeOfferingOutput struct { _ struct{} `type:"structure"` @@ -6682,6 +7248,19 @@ func (s RebootClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootClusterInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RebootClusterOutput struct { _ struct{} `type:"structure"` @@ -6855,6 +7434,19 @@ func (s ResetClusterParameterGroupInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetClusterParameterGroupInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreFromClusterSnapshotInput struct { _ struct{} `type:"structure"` @@ -7015,6 +7607,22 @@ func (s RestoreFromClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreFromClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreFromClusterSnapshotInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreFromClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -7111,6 +7719,31 @@ func (s RestoreTableFromClusterSnapshotInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreTableFromClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreTableFromClusterSnapshotInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.NewTableName == nil { + invalidParams.Add(request.NewErrParamRequired("NewTableName")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + if s.SourceDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDatabaseName")) + } + if s.SourceTableName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceTableName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreTableFromClusterSnapshotOutput struct { _ struct{} `type:"structure"` @@ -7163,6 +7796,19 @@ func (s RevokeClusterSecurityGroupIngressInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeClusterSecurityGroupIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeClusterSecurityGroupIngressInput"} + if s.ClusterSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterSecurityGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RevokeClusterSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` @@ -7206,6 +7852,22 @@ func (s RevokeSnapshotAccessInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeSnapshotAccessInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeSnapshotAccessInput"} + if s.AccountWithRestoreAccess == nil { + invalidParams.Add(request.NewErrParamRequired("AccountWithRestoreAccess")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RevokeSnapshotAccessOutput struct { _ struct{} `type:"structure"` @@ -7243,6 +7905,19 @@ func (s RotateEncryptionKeyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotateEncryptionKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotateEncryptionKeyInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RotateEncryptionKeyOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index 04747eae3..f0c313329 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -4,6 +4,7 @@ package route53 import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awsutil" @@ -1809,6 +1810,50 @@ func (c *Route53) UpdateTrafficPolicyInstance(input *UpdateTrafficPolicyInstance return out, err } +// A complex type that contains information to uniquely identify the CloudWatch +// alarm that you're associating with a Route 53 health check. +type AlarmIdentifier struct { + _ struct{} `type:"structure"` + + // The name of the CloudWatch alarm. + Name *string `min:"1" type:"string" required:"true"` + + // The CloudWatchRegion that the CloudWatch alarm was created in. + Region *string `min:"1" type:"string" required:"true" enum:"CloudWatchRegion"` +} + +// String returns the string representation +func (s AlarmIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlarmIdentifier) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AlarmIdentifier) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AlarmIdentifier"} + 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.Region == nil { + invalidParams.Add(request.NewErrParamRequired("Region")) + } + if s.Region != nil && len(*s.Region) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Region", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Alias resource record sets only: Information about the CloudFront distribution, // ELB load balancer, Amazon S3 bucket, or Amazon Route 53 resource record set // to which you are routing traffic. @@ -1944,6 +1989,25 @@ func (s AliasTarget) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AliasTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AliasTarget"} + if s.DNSName == nil { + invalidParams.Add(request.NewErrParamRequired("DNSName")) + } + if s.EvaluateTargetHealth == nil { + invalidParams.Add(request.NewErrParamRequired("EvaluateTargetHealth")) + } + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the request to associate a // VPC with an hosted zone. type AssociateVPCWithHostedZoneInput struct { @@ -1972,6 +2036,27 @@ func (s AssociateVPCWithHostedZoneInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateVPCWithHostedZoneInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateVPCWithHostedZoneInput"} + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + if s.VPC == nil { + invalidParams.Add(request.NewErrParamRequired("VPC")) + } + if s.VPC != nil { + if err := s.VPC.Validate(); err != nil { + invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing the response information for the request. type AssociateVPCWithHostedZoneOutput struct { _ struct{} `type:"structure"` @@ -2025,6 +2110,27 @@ func (s Change) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Change) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Change"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.ResourceRecordSet == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceRecordSet")) + } + if s.ResourceRecordSet != nil { + if err := s.ResourceRecordSet.Validate(); err != nil { + invalidParams.AddNested("ResourceRecordSet", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains an optional comment and the changes that you // want to make with a change batch request. type ChangeBatch struct { @@ -2048,6 +2154,32 @@ func (s ChangeBatch) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChangeBatch) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChangeBatch"} + if s.Changes == nil { + invalidParams.Add(request.NewErrParamRequired("Changes")) + } + if s.Changes != nil && len(s.Changes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Changes", 1)) + } + if s.Changes != nil { + for i, v := range s.Changes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Changes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that lists the changes and information for a ChangeBatch. type ChangeBatchRecord struct { _ struct{} `deprecated:"true" type:"structure"` @@ -2156,6 +2288,27 @@ func (s ChangeResourceRecordSetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChangeResourceRecordSetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChangeResourceRecordSetsInput"} + if s.ChangeBatch == nil { + invalidParams.Add(request.NewErrParamRequired("ChangeBatch")) + } + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + if s.ChangeBatch != nil { + if err := s.ChangeBatch.Validate(); err != nil { + invalidParams.AddNested("ChangeBatch", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing the response for the request. type ChangeResourceRecordSetsOutput struct { _ struct{} `type:"structure"` @@ -2211,6 +2364,28 @@ func (s ChangeTagsForResourceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChangeTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChangeTagsForResourceInput"} + if s.AddTags != nil && len(s.AddTags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AddTags", 1)) + } + if s.RemoveTagKeys != nil && len(s.RemoveTagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RemoveTagKeys", 1)) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Empty response for the request. type ChangeTagsForResourceOutput struct { _ struct{} `type:"structure"` @@ -2226,6 +2401,62 @@ func (s ChangeTagsForResourceOutput) GoString() string { return s.String() } +// For CLOUDWATCH_METRIC health checks, a complex type that contains information +// about the CloudWatch alarm that you're associating with the health check. +type CloudWatchAlarmConfiguration struct { + _ struct{} `type:"structure"` + + // The arithmetic operation to use when comparing the specified Statistic and + // Threshold. + // + // Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold + // and LessThanOrEqualToThreshold + ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` + + // A list of Dimension elements for the CloudWatch metric that is associated + // with the CloudWatch alarm. For information about the metrics and dimensions + // that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and + // Metrics Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html). + Dimensions []*Dimension `locationNameList:"Dimension" type:"list"` + + // The number of periods over which data is compared to the specified threshold. + EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"` + + // The name of the CloudWatch metric that is associated with the CloudWatch + // alarm. + MetricName *string `min:"1" type:"string" required:"true"` + + // The namespace of the CloudWatch metric that is associated with the CloudWatch + // alarm. + Namespace *string `min:"1" type:"string" required:"true"` + + // An integer that represents the period in seconds over which the statistic + // is applied. + Period *int64 `min:"60" type:"integer" required:"true"` + + // The statistic to apply to the CloudWatch metric that is associated with the + // CloudWatch alarm. + // + // Valid Values are SampleCount, Average, Sum, Minimum and Maximum + Statistic *string `type:"string" required:"true" enum:"Statistic"` + + // The value that the metric is compared with to determine the state of the + // alarm. For example, if you want the health check to fail if the average TCP + // connection time is greater than 500 milliseconds for more than 60 seconds, + // the threshold is 500. + Threshold *float64 `type:"double" required:"true"` +} + +// String returns the string representation +func (s CloudWatchAlarmConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchAlarmConfiguration) GoString() string { + return s.String() +} + // >A complex type that contains information about the request to create a health // check. type CreateHealthCheckInput struct { @@ -2255,6 +2486,30 @@ func (s CreateHealthCheckInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHealthCheckInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHealthCheckInput"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.CallerReference != nil && len(*s.CallerReference) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CallerReference", 1)) + } + if s.HealthCheckConfig == nil { + invalidParams.Add(request.NewErrParamRequired("HealthCheckConfig")) + } + if s.HealthCheckConfig != nil { + if err := s.HealthCheckConfig.Validate(); err != nil { + invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing the response information for the new health check. type CreateHealthCheckOutput struct { _ struct{} `type:"structure"` @@ -2325,6 +2580,30 @@ func (s CreateHostedZoneInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHostedZoneInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHostedZoneInput"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.CallerReference != nil && len(*s.CallerReference) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CallerReference", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.VPC != nil { + if err := s.VPC.Validate(); err != nil { + invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing the response information for the new hosted zone. type CreateHostedZoneOutput struct { _ struct{} `type:"structure"` @@ -2384,6 +2663,22 @@ func (s CreateReusableDelegationSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateReusableDelegationSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateReusableDelegationSetInput"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.CallerReference != nil && len(*s.CallerReference) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CallerReference", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateReusableDelegationSetOutput struct { _ struct{} `type:"structure"` @@ -2429,6 +2724,22 @@ func (s CreateTrafficPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrafficPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrafficPolicyInput"} + if s.Document == nil { + invalidParams.Add(request.NewErrParamRequired("Document")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the resource record sets that // you want to create based on a specified traffic policy. type CreateTrafficPolicyInstanceInput struct { @@ -2466,6 +2777,34 @@ func (s CreateTrafficPolicyInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrafficPolicyInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrafficPolicyInstanceInput"} + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.TTL == nil { + invalidParams.Add(request.NewErrParamRequired("TTL")) + } + if s.TrafficPolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficPolicyId")) + } + if s.TrafficPolicyVersion == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficPolicyVersion")) + } + if s.TrafficPolicyVersion != nil && *s.TrafficPolicyVersion < 1 { + invalidParams.Add(request.NewErrParamMinValue("TrafficPolicyVersion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the response information for the CreateTrafficPolicyInstance // request. type CreateTrafficPolicyInstanceOutput struct { @@ -2536,6 +2875,22 @@ func (s CreateTrafficPolicyVersionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrafficPolicyVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrafficPolicyVersionInput"} + if s.Document == nil { + invalidParams.Add(request.NewErrParamRequired("Document")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the response information for the CreateTrafficPolicyVersion // request. type CreateTrafficPolicyVersionOutput struct { @@ -2600,6 +2955,19 @@ func (s DeleteHealthCheckInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteHealthCheckInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteHealthCheckInput"} + if s.HealthCheckId == nil { + invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Empty response for the request. type DeleteHealthCheckOutput struct { _ struct{} `type:"structure"` @@ -2634,6 +3002,19 @@ func (s DeleteHostedZoneInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteHostedZoneInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteHostedZoneInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing the response information for the request. type DeleteHostedZoneOutput struct { _ struct{} `type:"structure"` @@ -2671,6 +3052,19 @@ func (s DeleteReusableDelegationSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteReusableDelegationSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteReusableDelegationSetInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Empty response for the request. type DeleteReusableDelegationSetOutput struct { _ struct{} `type:"structure"` @@ -2707,6 +3101,25 @@ func (s DeleteTrafficPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrafficPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficPolicyInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && *s.Version < 1 { + invalidParams.Add(request.NewErrParamMinValue("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the traffic policy instance // that you want to delete. type DeleteTrafficPolicyInstanceInput struct { @@ -2730,6 +3143,19 @@ func (s DeleteTrafficPolicyInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTrafficPolicyInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTrafficPolicyInstanceInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // An empty element. type DeleteTrafficPolicyInstanceOutput struct { _ struct{} `type:"structure"` @@ -2760,6 +3186,27 @@ func (s DeleteTrafficPolicyOutput) GoString() string { return s.String() } +// The name and value of a dimension for a CloudWatch metric. +type Dimension struct { + _ struct{} `type:"structure"` + + // The name of the dimension. + Name *string `min:"1" type:"string" required:"true"` + + // The value of the dimension. + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Dimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Dimension) GoString() string { + return s.String() +} + // A complex type that contains information about the request to disassociate // a VPC from an hosted zone. type DisassociateVPCFromHostedZoneInput struct { @@ -2787,6 +3234,27 @@ func (s DisassociateVPCFromHostedZoneInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateVPCFromHostedZoneInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateVPCFromHostedZoneInput"} + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + if s.VPC == nil { + invalidParams.Add(request.NewErrParamRequired("VPC")) + } + if s.VPC != nil { + if err := s.VPC.Validate(); err != nil { + invalidParams.AddNested("VPC", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing the response information for the request. type DisassociateVPCFromHostedZoneOutput struct { _ struct{} `type:"structure"` @@ -2844,6 +3312,25 @@ func (s GeoLocation) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GeoLocation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GeoLocation"} + if s.ContinentCode != nil && len(*s.ContinentCode) < 2 { + invalidParams.Add(request.NewErrParamMinLen("ContinentCode", 2)) + } + if s.CountryCode != nil && len(*s.CountryCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CountryCode", 1)) + } + if s.SubdivisionCode != nil && len(*s.SubdivisionCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubdivisionCode", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about a GeoLocation. type GeoLocationDetails struct { _ struct{} `type:"structure"` @@ -2906,6 +3393,19 @@ func (s GetChangeDetailsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetChangeDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetChangeDetailsInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the ChangeBatchRecord element. type GetChangeDetailsOutput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -2946,6 +3446,19 @@ func (s GetChangeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetChangeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetChangeInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the ChangeInfo element. type GetChangeOutput struct { _ struct{} `type:"structure"` @@ -3038,6 +3551,25 @@ func (s GetGeoLocationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGeoLocationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGeoLocationInput"} + if s.ContinentCode != nil && len(*s.ContinentCode) < 2 { + invalidParams.Add(request.NewErrParamMinLen("ContinentCode", 2)) + } + if s.CountryCode != nil && len(*s.CountryCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CountryCode", 1)) + } + if s.SubdivisionCode != nil && len(*s.SubdivisionCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubdivisionCode", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing information about the specified geo location. type GetGeoLocationOutput struct { _ struct{} `type:"structure"` @@ -3110,6 +3642,19 @@ func (s GetHealthCheckInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetHealthCheckInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetHealthCheckInput"} + if s.HealthCheckId == nil { + invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the request to get the most // recent failure reason for a health check. type GetHealthCheckLastFailureReasonInput struct { @@ -3130,6 +3675,19 @@ func (s GetHealthCheckLastFailureReasonInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetHealthCheckLastFailureReasonInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetHealthCheckLastFailureReasonInput"} + if s.HealthCheckId == nil { + invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the most recent failure for // the specified health check. type GetHealthCheckLastFailureReasonOutput struct { @@ -3241,6 +3799,19 @@ func (s GetHealthCheckStatusInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetHealthCheckStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetHealthCheckStatusInput"} + if s.HealthCheckId == nil { + invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the status of the specified // health check. type GetHealthCheckStatusOutput struct { @@ -3315,6 +3886,19 @@ func (s GetHostedZoneInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetHostedZoneInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetHostedZoneInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing information about the specified hosted zone. type GetHostedZoneOutput struct { _ struct{} `type:"structure"` @@ -3360,6 +3944,19 @@ func (s GetReusableDelegationSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetReusableDelegationSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetReusableDelegationSetInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing information about the specified reusable delegation // set. type GetReusableDelegationSetOutput struct { @@ -3404,6 +4001,25 @@ func (s GetTrafficPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTrafficPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTrafficPolicyInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && *s.Version < 1 { + invalidParams.Add(request.NewErrParamMinValue("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // To retrieve a count of all your traffic policy instances, send a GET request // to the /Route 53 API version/trafficpolicyinstancecount resource. type GetTrafficPolicyInstanceCountInput struct { @@ -3461,6 +4077,19 @@ func (s GetTrafficPolicyInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTrafficPolicyInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTrafficPolicyInstanceInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the resource record sets that // Amazon Route 53 created based on a specified traffic policy. type GetTrafficPolicyInstanceOutput struct { @@ -3505,6 +4134,10 @@ type HealthCheck struct { // A unique string that identifies the request to create the health check. CallerReference *string `min:"1" type:"string" required:"true"` + // For CLOUDWATCH_METRIC health checks, a complex type that contains information + // about the CloudWatch alarm that you're associating with the health check. + CloudWatchAlarmConfiguration *CloudWatchAlarmConfiguration `type:"structure"` + // A complex type that contains the health check configuration. HealthCheckConfig *HealthCheckConfig `type:"structure" required:"true"` @@ -3531,6 +4164,10 @@ func (s HealthCheck) GoString() string { type HealthCheckConfig struct { _ struct{} `type:"structure"` + // A complex type that contains information to uniquely identify the CloudWatch + // alarm that you're associating with a Route 53 health check. + AlarmIdentifier *AlarmIdentifier `type:"structure"` + // For a specified parent health check, a list of HealthCheckId values for the // associated child health checks. ChildHealthChecks []*string `locationNameList:"ChildHealthCheck" type:"list"` @@ -3562,6 +4199,10 @@ type HealthCheckConfig struct { // IP Address of the instance being checked. IPAddress *string `type:"string"` + // The status of the health check when CloudWatch has insufficient data about + // the state of associated alarm. Valid values are Healthy, Unhealthy and LastKnownStatus. + InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` + // A boolean value that indicates whether the status of health check should // be inverted. For example, if a health check is healthy but Inverted is True, // then Amazon Route 53 considers the health check to be unhealthy. @@ -3577,6 +4218,11 @@ type HealthCheckConfig struct { // For HTTPS and HTTPS_STR_MATCH this defaults to 443 if the port is not specified. Port *int64 `min:"1" type:"integer"` + // A list of HealthCheckRegion values that you want Amazon Route 53 to use to + // perform health checks for the specified endpoint. You must specify at least + // three regions. + Regions []*string `locationNameList:"Region" min:"1" type:"list"` + // The number of seconds between the time that Amazon Route 53 gets a response // from your endpoint and the time that it sends the next health-check request. // @@ -3595,7 +4241,7 @@ type HealthCheckConfig struct { SearchString *string `type:"string"` // The type of health check to be performed. Currently supported types are TCP, - // HTTP, HTTPS, HTTP_STR_MATCH, and HTTPS_STR_MATCH. + // HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, CALCULATED and CLOUDWATCH_METRIC. Type *string `type:"string" required:"true" enum:"HealthCheckType"` } @@ -3609,15 +4255,49 @@ func (s HealthCheckConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *HealthCheckConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HealthCheckConfig"} + if s.FailureThreshold != nil && *s.FailureThreshold < 1 { + invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) + } + if s.Port != nil && *s.Port < 1 { + invalidParams.Add(request.NewErrParamMinValue("Port", 1)) + } + if s.Regions != nil && len(s.Regions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) + } + if s.RequestInterval != nil && *s.RequestInterval < 10 { + invalidParams.Add(request.NewErrParamMinValue("RequestInterval", 10)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.AlarmIdentifier != nil { + if err := s.AlarmIdentifier.Validate(); err != nil { + invalidParams.AddNested("AlarmIdentifier", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the IP address of a Amazon Route 53 health checker // and the reason for the health check status. type HealthCheckObservation struct { _ struct{} `type:"structure"` - // The IP address of the Amazon Route 53 health checker that performed the health - // check. + // The IP address of the Amazon Route 53 health checker that performed this + // health check. IPAddress *string `type:"string"` + // The HealthCheckRegion of the Amazon Route 53 health checker that performed + // this health check. + Region *string `min:"1" type:"string" enum:"HealthCheckRegion"` + // A complex type that contains information about the health check status for // the current observation. StatusReport *StatusReport `type:"structure"` @@ -3725,6 +4405,25 @@ func (s ListChangeBatchesByHostedZoneInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListChangeBatchesByHostedZoneInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListChangeBatchesByHostedZoneInput"} + if s.EndDate == nil { + invalidParams.Add(request.NewErrParamRequired("EndDate")) + } + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + if s.StartDate == nil { + invalidParams.Add(request.NewErrParamRequired("StartDate")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The input for a ListChangeBatchesByHostedZone request. type ListChangeBatchesByHostedZoneOutput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -3794,6 +4493,34 @@ func (s ListChangeBatchesByRRSetInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListChangeBatchesByRRSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListChangeBatchesByRRSetInput"} + if s.EndDate == nil { + invalidParams.Add(request.NewErrParamRequired("EndDate")) + } + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.SetIdentifier != nil && len(*s.SetIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SetIdentifier", 1)) + } + if s.StartDate == nil { + invalidParams.Add(request.NewErrParamRequired("StartDate")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The input for a ListChangeBatchesByRRSet request. type ListChangeBatchesByRRSetOutput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -3866,6 +4593,25 @@ func (s ListGeoLocationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGeoLocationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGeoLocationsInput"} + if s.StartContinentCode != nil && len(*s.StartContinentCode) < 2 { + invalidParams.Add(request.NewErrParamMinLen("StartContinentCode", 2)) + } + if s.StartCountryCode != nil && len(*s.StartCountryCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StartCountryCode", 1)) + } + if s.StartSubdivisionCode != nil && len(*s.StartSubdivisionCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StartSubdivisionCode", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the geo locations that are // returned by the request and information about the response. type ListGeoLocationsOutput struct { @@ -4210,6 +4956,22 @@ func (s ListResourceRecordSetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResourceRecordSetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResourceRecordSetsInput"} + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + if s.StartRecordIdentifier != nil && len(*s.StartRecordIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StartRecordIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the resource record sets that // are returned by the request and information about the response. type ListResourceRecordSetsOutput struct { @@ -4361,6 +5123,22 @@ 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.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing tags for the specified resource. type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` @@ -4406,6 +5184,25 @@ func (s ListTagsForResourcesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourcesInput"} + if s.ResourceIds == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIds")) + } + if s.ResourceIds != nil && len(s.ResourceIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceIds", 1)) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing tags for the specified resources. type ListTagsForResourcesOutput struct { _ struct{} `type:"structure"` @@ -4546,6 +5343,19 @@ func (s ListTrafficPolicyInstancesByHostedZoneInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTrafficPolicyInstancesByHostedZoneInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTrafficPolicyInstancesByHostedZoneInput"} + if s.HostedZoneId == nil { + invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the response information for the request. type ListTrafficPolicyInstancesByHostedZoneOutput struct { _ struct{} `type:"structure"` @@ -4657,6 +5467,25 @@ func (s ListTrafficPolicyInstancesByPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTrafficPolicyInstancesByPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTrafficPolicyInstancesByPolicyInput"} + if s.TrafficPolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficPolicyId")) + } + if s.TrafficPolicyVersion == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficPolicyVersion")) + } + if s.TrafficPolicyVersion != nil && *s.TrafficPolicyVersion < 1 { + invalidParams.Add(request.NewErrParamMinValue("TrafficPolicyVersion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the response information for the request. type ListTrafficPolicyInstancesByPolicyOutput struct { _ struct{} `type:"structure"` @@ -4850,6 +5679,19 @@ func (s ListTrafficPolicyVersionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTrafficPolicyVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTrafficPolicyVersionsInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the response information for the request. type ListTrafficPolicyVersionsOutput struct { _ struct{} `type:"structure"` @@ -4915,6 +5757,19 @@ func (s ResourceRecord) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceRecord) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceRecord"} + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the current resource record // set. type ResourceRecordSet struct { @@ -5144,6 +5999,51 @@ func (s ResourceRecordSet) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceRecordSet) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceRecordSet"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Region != nil && len(*s.Region) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Region", 1)) + } + if s.ResourceRecords != nil && len(s.ResourceRecords) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceRecords", 1)) + } + if s.SetIdentifier != nil && len(*s.SetIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SetIdentifier", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.AliasTarget != nil { + if err := s.AliasTarget.Validate(); err != nil { + invalidParams.AddNested("AliasTarget", err.(request.ErrInvalidParams)) + } + } + if s.GeoLocation != nil { + if err := s.GeoLocation.Validate(); err != nil { + invalidParams.AddNested("GeoLocation", err.(request.ErrInvalidParams)) + } + } + if s.ResourceRecords != nil { + for i, v := range s.ResourceRecords { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceRecords", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing a resource and its associated tags. type ResourceTagSet struct { _ struct{} `type:"structure"` @@ -5305,6 +6205,10 @@ func (s TrafficPolicySummary) GoString() string { type UpdateHealthCheckInput struct { _ struct{} `locationName:"UpdateHealthCheckRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` + // A complex type that contains information to uniquely identify the CloudWatch + // alarm that you're associating with a Route 53 health check. + AlarmIdentifier *AlarmIdentifier `type:"structure"` + // For a specified parent health check, a list of HealthCheckId values for the // associated child health checks. // @@ -5357,6 +6261,8 @@ type UpdateHealthCheckInput struct { // Specify this value only if you want to change it. IPAddress *string `type:"string"` + InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` + // A boolean value that indicates whether the status of health check should // be inverted. For example, if a health check is healthy but Inverted is True, // then Amazon Route 53 considers the health check to be unhealthy. @@ -5370,6 +6276,15 @@ type UpdateHealthCheckInput struct { // Specify this value only if you want to change it. Port *int64 `min:"1" type:"integer"` + // A list of HealthCheckRegion values that specify the Amazon EC2 regions that + // you want Amazon Route 53 to use to perform health checks. You must specify + // at least three regions. + // + // When you remove a region from the list, Amazon Route 53 will briefly continue + // to check your endpoint from that region. Specify this value only if you want + // to change it. + Regions []*string `locationNameList:"Region" min:"1" type:"list"` + // The path that you want Amazon Route 53 to request when performing health // checks. The path can be any value for which your endpoint will return an // HTTP status code of 2xx or 3xx when the endpoint is healthy, for example @@ -5398,6 +6313,36 @@ func (s UpdateHealthCheckInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateHealthCheckInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateHealthCheckInput"} + if s.FailureThreshold != nil && *s.FailureThreshold < 1 { + invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) + } + if s.HealthCheckId == nil { + invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) + } + if s.HealthCheckVersion != nil && *s.HealthCheckVersion < 1 { + invalidParams.Add(request.NewErrParamMinValue("HealthCheckVersion", 1)) + } + if s.Port != nil && *s.Port < 1 { + invalidParams.Add(request.NewErrParamMinValue("Port", 1)) + } + if s.Regions != nil && len(s.Regions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) + } + if s.AlarmIdentifier != nil { + if err := s.AlarmIdentifier.Validate(); err != nil { + invalidParams.AddNested("AlarmIdentifier", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UpdateHealthCheckOutput struct { _ struct{} `type:"structure"` @@ -5437,6 +6382,19 @@ func (s UpdateHostedZoneCommentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateHostedZoneCommentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateHostedZoneCommentInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type containing information about the specified hosted zone after // the update. type UpdateHostedZoneCommentOutput struct { @@ -5482,6 +6440,28 @@ func (s UpdateTrafficPolicyCommentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTrafficPolicyCommentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTrafficPolicyCommentInput"} + if s.Comment == nil { + invalidParams.Add(request.NewErrParamRequired("Comment")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && *s.Version < 1 { + invalidParams.Add(request.NewErrParamMinValue("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains the response information for the traffic policy. type UpdateTrafficPolicyCommentOutput struct { _ struct{} `type:"structure"` @@ -5531,6 +6511,31 @@ func (s UpdateTrafficPolicyInstanceInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTrafficPolicyInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTrafficPolicyInstanceInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.TTL == nil { + invalidParams.Add(request.NewErrParamRequired("TTL")) + } + if s.TrafficPolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficPolicyId")) + } + if s.TrafficPolicyVersion == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficPolicyVersion")) + } + if s.TrafficPolicyVersion != nil && *s.TrafficPolicyVersion < 1 { + invalidParams.Add(request.NewErrParamMinValue("TrafficPolicyVersion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A complex type that contains information about the resource record sets that // Amazon Route 53 created based on a specified traffic policy. type UpdateTrafficPolicyInstanceOutput struct { @@ -5569,6 +6574,19 @@ func (s VPC) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *VPC) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VPC"} + if s.VPCRegion != nil && len(*s.VPCRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VPCRegion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + const ( // @enum ChangeAction ChangeActionCreate = "CREATE" @@ -5585,6 +6603,61 @@ const ( ChangeStatusInsync = "INSYNC" ) +const ( + // @enum CloudWatchRegion + CloudWatchRegionUsEast1 = "us-east-1" + // @enum CloudWatchRegion + CloudWatchRegionUsWest1 = "us-west-1" + // @enum CloudWatchRegion + CloudWatchRegionUsWest2 = "us-west-2" + // @enum CloudWatchRegion + CloudWatchRegionEuCentral1 = "eu-central-1" + // @enum CloudWatchRegion + CloudWatchRegionEuWest1 = "eu-west-1" + // @enum CloudWatchRegion + CloudWatchRegionApSoutheast1 = "ap-southeast-1" + // @enum CloudWatchRegion + CloudWatchRegionApSoutheast2 = "ap-southeast-2" + // @enum CloudWatchRegion + CloudWatchRegionApNortheast1 = "ap-northeast-1" + // @enum CloudWatchRegion + CloudWatchRegionApNortheast2 = "ap-northeast-2" + // @enum CloudWatchRegion + CloudWatchRegionSaEast1 = "sa-east-1" +) + +const ( + // @enum ComparisonOperator + ComparisonOperatorGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold" + // @enum ComparisonOperator + ComparisonOperatorGreaterThanThreshold = "GreaterThanThreshold" + // @enum ComparisonOperator + ComparisonOperatorLessThanThreshold = "LessThanThreshold" + // @enum ComparisonOperator + ComparisonOperatorLessThanOrEqualToThreshold = "LessThanOrEqualToThreshold" +) + +// An Amazon EC2 region that you want Amazon Route 53 to use to perform health +// checks. +const ( + // @enum HealthCheckRegion + HealthCheckRegionUsEast1 = "us-east-1" + // @enum HealthCheckRegion + HealthCheckRegionUsWest1 = "us-west-1" + // @enum HealthCheckRegion + HealthCheckRegionUsWest2 = "us-west-2" + // @enum HealthCheckRegion + HealthCheckRegionEuWest1 = "eu-west-1" + // @enum HealthCheckRegion + HealthCheckRegionApSoutheast1 = "ap-southeast-1" + // @enum HealthCheckRegion + HealthCheckRegionApSoutheast2 = "ap-southeast-2" + // @enum HealthCheckRegion + HealthCheckRegionApNortheast1 = "ap-northeast-1" + // @enum HealthCheckRegion + HealthCheckRegionSaEast1 = "sa-east-1" +) + const ( // @enum HealthCheckType HealthCheckTypeHttp = "HTTP" @@ -5598,6 +6671,17 @@ const ( HealthCheckTypeTcp = "TCP" // @enum HealthCheckType HealthCheckTypeCalculated = "CALCULATED" + // @enum HealthCheckType + HealthCheckTypeCloudwatchMetric = "CLOUDWATCH_METRIC" +) + +const ( + // @enum InsufficientDataHealthStatus + InsufficientDataHealthStatusHealthy = "Healthy" + // @enum InsufficientDataHealthStatus + InsufficientDataHealthStatusUnhealthy = "Unhealthy" + // @enum InsufficientDataHealthStatus + InsufficientDataHealthStatusLastKnownStatus = "LastKnownStatus" ) const ( @@ -5655,6 +6739,19 @@ const ( ResourceRecordSetRegionCnNorth1 = "cn-north-1" ) +const ( + // @enum Statistic + StatisticAverage = "Average" + // @enum Statistic + StatisticSum = "Sum" + // @enum Statistic + StatisticSampleCount = "SampleCount" + // @enum Statistic + StatisticMaximum = "Maximum" + // @enum Statistic + StatisticMinimum = "Minimum" +) + const ( // @enum TagResourceType TagResourceTypeHealthcheck = "healthcheck" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 4f170986b..f46df025e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -4,6 +4,7 @@ package s3 import ( + "fmt" "io" "time" @@ -419,6 +420,33 @@ func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, err return out, err } +const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration" + +// GetBucketAccelerateConfigurationRequest generates a request for the GetBucketAccelerateConfiguration operation. +func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) { + op := &request.Operation{ + Name: opGetBucketAccelerateConfiguration, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?accelerate", + } + + if input == nil { + input = &GetBucketAccelerateConfigurationInput{} + } + + req = c.newRequest(op, input, output) + output = &GetBucketAccelerateConfigurationOutput{} + req.Data = output + return +} + +// Returns the accelerate configuration of a bucket. +func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) { + req, out := c.GetBucketAccelerateConfigurationRequest(input) + err := req.Send() + return out, err +} + const opGetBucketAcl = "GetBucketAcl" // GetBucketAclRequest generates a request for the GetBucketAcl operation. @@ -1137,6 +1165,35 @@ func (c *S3) ListPartsPages(input *ListPartsInput, fn func(p *ListPartsOutput, l }) } +const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration" + +// PutBucketAccelerateConfigurationRequest generates a request for the PutBucketAccelerateConfiguration operation. +func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) { + op := &request.Operation{ + Name: opPutBucketAccelerateConfiguration, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}?accelerate", + } + + if input == nil { + input = &PutBucketAccelerateConfigurationInput{} + } + + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + output = &PutBucketAccelerateConfigurationOutput{} + req.Data = output + return +} + +// Sets the accelerate configuration of an existing bucket. +func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) { + req, out := c.PutBucketAccelerateConfigurationRequest(input) + err := req.Send() + return out, err +} + const opPutBucketAcl = "PutBucketAcl" // PutBucketAclRequest generates a request for the PutBucketAcl operation. @@ -1718,6 +1775,28 @@ func (s AbortMultipartUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AbortMultipartUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + 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.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AbortMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -1736,6 +1815,23 @@ func (s AbortMultipartUploadOutput) GoString() string { return s.String() } +type AccelerateConfiguration struct { + _ struct{} `type:"structure"` + + // The accelerate configuration of the bucket. + Status *string `type:"string" enum:"BucketAccelerateStatus"` +} + +// String returns the string representation +func (s AccelerateConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccelerateConfiguration) GoString() string { + return s.String() +} + type AccessControlPolicy struct { _ struct{} `type:"structure"` @@ -1755,6 +1851,26 @@ func (s AccessControlPolicy) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AccessControlPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"} + if s.Grants != nil { + for i, v := range s.Grants { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type Bucket struct { _ struct{} `type:"structure"` @@ -1791,6 +1907,29 @@ func (s BucketLifecycleConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BucketLifecycleConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"} + if s.Rules == nil { + invalidParams.Add(request.NewErrParamRequired("Rules")) + } + if s.Rules != nil { + for i, v := range s.Rules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type BucketLoggingStatus struct { _ struct{} `type:"structure"` @@ -1807,6 +1946,21 @@ func (s BucketLoggingStatus) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *BucketLoggingStatus) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"} + if s.LoggingEnabled != nil { + if err := s.LoggingEnabled.Validate(); err != nil { + invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CORSConfiguration struct { _ struct{} `type:"structure"` @@ -1823,6 +1977,29 @@ func (s CORSConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CORSConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"} + if s.CORSRules == nil { + invalidParams.Add(request.NewErrParamRequired("CORSRules")) + } + if s.CORSRules != nil { + for i, v := range s.CORSRules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CORSRule struct { _ struct{} `type:"structure"` @@ -1856,6 +2033,22 @@ func (s CORSRule) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CORSRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CORSRule"} + if s.AllowedMethods == nil { + invalidParams.Add(request.NewErrParamRequired("AllowedMethods")) + } + if s.AllowedOrigins == nil { + invalidParams.Add(request.NewErrParamRequired("AllowedOrigins")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CloudFunctionConfiguration struct { _ struct{} `type:"structure"` @@ -1927,6 +2120,28 @@ func (s CompleteMultipartUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompleteMultipartUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + 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.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CompleteMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -2165,6 +2380,28 @@ func (s CopyObjectInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.CopySource == nil { + invalidParams.Add(request.NewErrParamRequired("CopySource")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CopyObjectOutput struct { _ struct{} `type:"structure" payload:"CopyObjectResult"` @@ -2304,6 +2541,19 @@ func (s CreateBucketInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBucketInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateBucketOutput struct { _ struct{} `type:"structure"` @@ -2415,6 +2665,25 @@ func (s CreateMultipartUploadInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateMultipartUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type CreateMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -2487,6 +2756,29 @@ func (s Delete) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Delete) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Delete"} + if s.Objects == nil { + invalidParams.Add(request.NewErrParamRequired("Objects")) + } + if s.Objects != nil { + for i, v := range s.Objects { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketCorsInput struct { _ struct{} `type:"structure"` @@ -2503,6 +2795,19 @@ func (s DeleteBucketCorsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketCorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketCorsOutput struct { _ struct{} `type:"structure"` } @@ -2533,6 +2838,19 @@ func (s DeleteBucketInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketLifecycleInput struct { _ struct{} `type:"structure"` @@ -2549,6 +2867,19 @@ func (s DeleteBucketLifecycleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketLifecycleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketLifecycleOutput struct { _ struct{} `type:"structure"` } @@ -2593,6 +2924,19 @@ func (s DeleteBucketPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketPolicyOutput struct { _ struct{} `type:"structure"` } @@ -2623,6 +2967,19 @@ func (s DeleteBucketReplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketReplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketReplicationOutput struct { _ struct{} `type:"structure"` } @@ -2653,6 +3010,19 @@ func (s DeleteBucketTaggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketTaggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketTaggingOutput struct { _ struct{} `type:"structure"` } @@ -2683,6 +3053,19 @@ func (s DeleteBucketWebsiteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBucketWebsiteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteBucketWebsiteOutput struct { _ struct{} `type:"structure"` } @@ -2757,6 +3140,25 @@ func (s DeleteObjectInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteObjectOutput struct { _ struct{} `type:"structure"` @@ -2811,6 +3213,27 @@ func (s DeleteObjectsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteObjectsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Delete == nil { + invalidParams.Add(request.NewErrParamRequired("Delete")) + } + if s.Delete != nil { + if err := s.Delete.Validate(); err != nil { + invalidParams.AddNested("Delete", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteObjectsOutput struct { _ struct{} `type:"structure"` @@ -2876,6 +3299,19 @@ func (s Destination) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Destination) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Destination"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type Error struct { _ struct{} `type:"structure"` @@ -2915,6 +3351,22 @@ func (s ErrorDocument) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ErrorDocument) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Container for key value pair that defines the criteria for the filter rule. type FilterRule struct { _ struct{} `type:"structure"` @@ -2939,6 +3391,53 @@ func (s FilterRule) GoString() string { return s.String() } +type GetBucketAccelerateConfigurationInput struct { + _ struct{} `type:"structure"` + + // Name of the bucket for which the accelerate configuration is retrieved. + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBucketAccelerateConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketAccelerateConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketAccelerateConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +type GetBucketAccelerateConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The accelerate configuration of the bucket. + Status *string `type:"string" enum:"BucketAccelerateStatus"` +} + +// String returns the string representation +func (s GetBucketAccelerateConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketAccelerateConfigurationOutput) GoString() string { + return s.String() +} + type GetBucketAclInput struct { _ struct{} `type:"structure"` @@ -2955,6 +3454,19 @@ func (s GetBucketAclInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketAclOutput struct { _ struct{} `type:"structure"` @@ -2990,6 +3502,19 @@ func (s GetBucketCorsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketCorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketCorsOutput struct { _ struct{} `type:"structure"` @@ -3022,6 +3547,19 @@ func (s GetBucketLifecycleConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketLifecycleConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketLifecycleConfigurationOutput struct { _ struct{} `type:"structure"` @@ -3054,6 +3592,19 @@ func (s GetBucketLifecycleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketLifecycleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketLifecycleOutput struct { _ struct{} `type:"structure"` @@ -3086,6 +3637,19 @@ func (s GetBucketLocationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketLocationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketLocationOutput struct { _ struct{} `type:"structure"` @@ -3118,6 +3682,19 @@ func (s GetBucketLoggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketLoggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketLoggingOutput struct { _ struct{} `type:"structure"` @@ -3151,6 +3728,19 @@ func (s GetBucketNotificationConfigurationRequest) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketNotificationConfigurationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketPolicyInput struct { _ struct{} `type:"structure"` @@ -3167,6 +3757,19 @@ func (s GetBucketPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketPolicyOutput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -3200,6 +3803,19 @@ func (s GetBucketReplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketReplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketReplicationOutput struct { _ struct{} `type:"structure" payload:"ReplicationConfiguration"` @@ -3234,6 +3850,19 @@ func (s GetBucketRequestPaymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketRequestPaymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketRequestPaymentOutput struct { _ struct{} `type:"structure"` @@ -3267,6 +3896,19 @@ func (s GetBucketTaggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketTaggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketTaggingOutput struct { _ struct{} `type:"structure"` @@ -3299,6 +3941,19 @@ func (s GetBucketVersioningInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketVersioningInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketVersioningOutput struct { _ struct{} `type:"structure"` @@ -3337,6 +3992,19 @@ func (s GetBucketWebsiteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketWebsiteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetBucketWebsiteOutput struct { _ struct{} `type:"structure"` @@ -3386,6 +4054,25 @@ func (s GetObjectAclInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetObjectAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetObjectAclOutput struct { _ struct{} `type:"structure"` @@ -3489,6 +4176,25 @@ func (s GetObjectInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetObjectOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -3622,6 +4328,25 @@ func (s GetObjectTorrentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetObjectTorrentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type GetObjectTorrentOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -3661,6 +4386,21 @@ func (s Grant) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Grant) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Grant"} + if s.Grantee != nil { + if err := s.Grantee.Validate(); err != nil { + invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type Grantee struct { _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` @@ -3690,6 +4430,19 @@ func (s Grantee) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Grantee) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Grantee"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type HeadBucketInput struct { _ struct{} `type:"structure"` @@ -3706,6 +4459,19 @@ func (s HeadBucketInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *HeadBucketInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type HeadBucketOutput struct { _ struct{} `type:"structure"` } @@ -3782,6 +4548,25 @@ func (s HeadObjectInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *HeadObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type HeadObjectOutput struct { _ struct{} `type:"structure"` @@ -3905,6 +4690,19 @@ func (s IndexDocument) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *IndexDocument) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IndexDocument"} + if s.Suffix == nil { + invalidParams.Add(request.NewErrParamRequired("Suffix")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type Initiator struct { _ struct{} `type:"structure"` @@ -3975,6 +4773,22 @@ func (s LambdaFunctionConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LambdaFunctionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"} + if s.Events == nil { + invalidParams.Add(request.NewErrParamRequired("Events")) + } + if s.LambdaFunctionArn == nil { + invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type LifecycleConfiguration struct { _ struct{} `type:"structure"` @@ -3991,6 +4805,29 @@ func (s LifecycleConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LifecycleConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"} + if s.Rules == nil { + invalidParams.Add(request.NewErrParamRequired("Rules")) + } + if s.Rules != nil { + for i, v := range s.Rules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type LifecycleExpiration struct { _ struct{} `type:"structure"` @@ -4060,6 +4897,22 @@ func (s LifecycleRule) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LifecycleRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"} + if s.Prefix == nil { + invalidParams.Add(request.NewErrParamRequired("Prefix")) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListBucketsInput struct { _ struct{} `type:"structure"` } @@ -4137,6 +4990,19 @@ func (s ListMultipartUploadsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMultipartUploadsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListMultipartUploadsOutput struct { _ struct{} `type:"structure"` @@ -4231,6 +5097,19 @@ func (s ListObjectVersionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListObjectVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListObjectVersionsOutput struct { _ struct{} `type:"structure"` @@ -4317,6 +5196,19 @@ func (s ListObjectsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListObjectsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListObjectsOutput struct { _ struct{} `type:"structure"` @@ -4395,6 +5287,28 @@ func (s ListPartsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPartsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + 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.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ListPartsOutput struct { _ struct{} `type:"structure"` @@ -4481,6 +5395,26 @@ func (s LoggingEnabled) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoggingEnabled) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"} + if s.TargetGrants != nil { + for i, v := range s.TargetGrants { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type MultipartUpload struct { _ struct{} `type:"structure"` @@ -4589,6 +5523,46 @@ func (s NotificationConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *NotificationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"} + if s.LambdaFunctionConfigurations != nil { + for i, v := range s.LambdaFunctionConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + if s.QueueConfigurations != nil { + for i, v := range s.QueueConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TopicConfigurations != nil { + for i, v := range s.TopicConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type NotificationConfigurationDeprecated struct { _ struct{} `type:"structure"` @@ -4676,6 +5650,22 @@ func (s ObjectIdentifier) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ObjectIdentifier) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ObjectVersion struct { _ struct{} `type:"structure"` @@ -4758,6 +5748,56 @@ func (s Part) GoString() string { return s.String() } +type PutBucketAccelerateConfigurationInput struct { + _ struct{} `type:"structure" payload:"AccelerateConfiguration"` + + // Specifies the Accelerate Configuration you want to set for the bucket. + AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true"` + + // Name of the bucket for which the accelerate configuration is set. + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutBucketAccelerateConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBucketAccelerateConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketAccelerateConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"} + if s.AccelerateConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration")) + } + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +type PutBucketAccelerateConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutBucketAccelerateConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBucketAccelerateConfigurationOutput) GoString() string { + return s.String() +} + type PutBucketAclInput struct { _ struct{} `type:"structure" payload:"AccessControlPolicy"` @@ -4795,6 +5835,24 @@ func (s PutBucketAclInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.AccessControlPolicy != nil { + if err := s.AccessControlPolicy.Validate(); err != nil { + invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketAclOutput struct { _ struct{} `type:"structure"` } @@ -4827,6 +5885,27 @@ func (s PutBucketCorsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketCorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.CORSConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("CORSConfiguration")) + } + if s.CORSConfiguration != nil { + if err := s.CORSConfiguration.Validate(); err != nil { + invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketCorsOutput struct { _ struct{} `type:"structure"` } @@ -4859,6 +5938,24 @@ func (s PutBucketLifecycleConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketLifecycleConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.LifecycleConfiguration != nil { + if err := s.LifecycleConfiguration.Validate(); err != nil { + invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketLifecycleConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -4891,6 +5988,24 @@ func (s PutBucketLifecycleInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketLifecycleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.LifecycleConfiguration != nil { + if err := s.LifecycleConfiguration.Validate(); err != nil { + invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketLifecycleOutput struct { _ struct{} `type:"structure"` } @@ -4923,6 +6038,27 @@ func (s PutBucketLoggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketLoggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.BucketLoggingStatus == nil { + invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus")) + } + if s.BucketLoggingStatus != nil { + if err := s.BucketLoggingStatus.Validate(); err != nil { + invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketLoggingOutput struct { _ struct{} `type:"structure"` } @@ -4957,6 +6093,27 @@ func (s PutBucketNotificationConfigurationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketNotificationConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.NotificationConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) + } + if s.NotificationConfiguration != nil { + if err := s.NotificationConfiguration.Validate(); err != nil { + invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketNotificationConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -4989,6 +6146,22 @@ func (s PutBucketNotificationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketNotificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.NotificationConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketNotificationOutput struct { _ struct{} `type:"structure"` } @@ -5022,6 +6195,22 @@ func (s PutBucketPolicyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Policy == nil { + invalidParams.Add(request.NewErrParamRequired("Policy")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketPolicyOutput struct { _ struct{} `type:"structure"` } @@ -5056,6 +6245,27 @@ func (s PutBucketReplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketReplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.ReplicationConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration")) + } + if s.ReplicationConfiguration != nil { + if err := s.ReplicationConfiguration.Validate(); err != nil { + invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketReplicationOutput struct { _ struct{} `type:"structure"` } @@ -5088,6 +6298,27 @@ func (s PutBucketRequestPaymentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketRequestPaymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.RequestPaymentConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration")) + } + if s.RequestPaymentConfiguration != nil { + if err := s.RequestPaymentConfiguration.Validate(); err != nil { + invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketRequestPaymentOutput struct { _ struct{} `type:"structure"` } @@ -5120,6 +6351,27 @@ func (s PutBucketTaggingInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketTaggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Tagging == nil { + invalidParams.Add(request.NewErrParamRequired("Tagging")) + } + if s.Tagging != nil { + if err := s.Tagging.Validate(); err != nil { + invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketTaggingOutput struct { _ struct{} `type:"structure"` } @@ -5156,6 +6408,22 @@ func (s PutBucketVersioningInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketVersioningInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.VersioningConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketVersioningOutput struct { _ struct{} `type:"structure"` } @@ -5188,6 +6456,27 @@ func (s PutBucketWebsiteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketWebsiteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.WebsiteConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration")) + } + if s.WebsiteConfiguration != nil { + if err := s.WebsiteConfiguration.Validate(); err != nil { + invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutBucketWebsiteOutput struct { _ struct{} `type:"structure"` } @@ -5235,6 +6524,9 @@ type PutObjectAclInput struct { // Documentation on downloading objects from requester pays buckets can be found // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + + // VersionId used to reference a specific version of the object. + VersionId *string `location:"querystring" locationName:"versionId" type:"string"` } // String returns the string representation @@ -5247,6 +6539,30 @@ func (s PutObjectAclInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutObjectAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + 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.AccessControlPolicy != nil { + if err := s.AccessControlPolicy.Validate(); err != nil { + invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutObjectAclOutput struct { _ struct{} `type:"structure"` @@ -5369,6 +6685,25 @@ func (s PutObjectInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PutObjectOutput struct { _ struct{} `type:"structure"` @@ -5446,6 +6781,22 @@ func (s QueueConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *QueueConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"} + if s.Events == nil { + invalidParams.Add(request.NewErrParamRequired("Events")) + } + if s.QueueArn == nil { + invalidParams.Add(request.NewErrParamRequired("QueueArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type QueueConfigurationDeprecated struct { _ struct{} `type:"structure"` @@ -5530,6 +6881,19 @@ func (s RedirectAllRequestsTo) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RedirectAllRequestsTo) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"} + if s.HostName == nil { + invalidParams.Add(request.NewErrParamRequired("HostName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Container for replication rules. You can add as many as 1,000 rules. Total // replication configuration size can be up to 2 MB. type ReplicationConfiguration struct { @@ -5554,6 +6918,32 @@ func (s ReplicationConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"} + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.Rules == nil { + invalidParams.Add(request.NewErrParamRequired("Rules")) + } + if s.Rules != nil { + for i, v := range s.Rules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ReplicationRule struct { _ struct{} `type:"structure"` @@ -5581,6 +6971,30 @@ func (s ReplicationRule) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicationRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.Prefix == nil { + invalidParams.Add(request.NewErrParamRequired("Prefix")) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + if s.Destination != nil { + if err := s.Destination.Validate(); err != nil { + invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RequestPaymentConfiguration struct { _ struct{} `type:"structure"` @@ -5598,6 +7012,19 @@ func (s RequestPaymentConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestPaymentConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"} + if s.Payer == nil { + invalidParams.Add(request.NewErrParamRequired("Payer")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreObjectInput struct { _ struct{} `type:"structure" payload:"RestoreRequest"` @@ -5626,6 +7053,30 @@ func (s RestoreObjectInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + 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.RestoreRequest != nil { + if err := s.RestoreRequest.Validate(); err != nil { + invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RestoreObjectOutput struct { _ struct{} `type:"structure"` @@ -5661,6 +7112,19 @@ func (s RestoreRequest) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"} + if s.Days == nil { + invalidParams.Add(request.NewErrParamRequired("Days")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RoutingRule struct { _ struct{} `type:"structure"` @@ -5686,6 +7150,19 @@ func (s RoutingRule) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RoutingRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RoutingRule"} + if s.Redirect == nil { + invalidParams.Add(request.NewErrParamRequired("Redirect")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type Rule struct { _ struct{} `type:"structure"` @@ -5732,6 +7209,22 @@ func (s Rule) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Rule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Rule"} + if s.Prefix == nil { + invalidParams.Add(request.NewErrParamRequired("Prefix")) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type Tag struct { _ struct{} `type:"structure"` @@ -5752,6 +7245,25 @@ 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 +} + type Tagging struct { _ struct{} `type:"structure"` @@ -5768,6 +7280,29 @@ func (s Tagging) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tagging) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tagging"} + if s.TagSet == nil { + invalidParams.Add(request.NewErrParamRequired("TagSet")) + } + if s.TagSet != nil { + for i, v := range s.TagSet { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type TargetGrant struct { _ struct{} `type:"structure"` @@ -5787,6 +7322,21 @@ func (s TargetGrant) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetGrant) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetGrant"} + if s.Grantee != nil { + if err := s.Grantee.Validate(); err != nil { + invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Container for specifying the configuration when you want Amazon S3 to publish // events to an Amazon Simple Notification Service (Amazon SNS) topic. type TopicConfiguration struct { @@ -5818,6 +7368,22 @@ func (s TopicConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *TopicConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"} + if s.Events == nil { + invalidParams.Add(request.NewErrParamRequired("Events")) + } + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type TopicConfigurationDeprecated struct { _ struct{} `type:"structure"` @@ -5954,6 +7520,34 @@ func (s UploadPartCopyInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadPartCopyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.CopySource == nil { + invalidParams.Add(request.NewErrParamRequired("CopySource")) + } + 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.PartNumber == nil { + invalidParams.Add(request.NewErrParamRequired("PartNumber")) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UploadPartCopyOutput struct { _ struct{} `type:"structure" payload:"CopyPartResult"` @@ -6052,6 +7646,31 @@ func (s UploadPartInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UploadPartInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + 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.PartNumber == nil { + invalidParams.Add(request.NewErrParamRequired("PartNumber")) + } + if s.UploadId == nil { + invalidParams.Add(request.NewErrParamRequired("UploadId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UploadPartOutput struct { _ struct{} `type:"structure"` @@ -6135,6 +7754,48 @@ func (s WebsiteConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *WebsiteConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"} + if s.ErrorDocument != nil { + if err := s.ErrorDocument.Validate(); err != nil { + invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams)) + } + } + if s.IndexDocument != nil { + if err := s.IndexDocument.Validate(); err != nil { + invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams)) + } + } + if s.RedirectAllRequestsTo != nil { + if err := s.RedirectAllRequestsTo.Validate(); err != nil { + invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams)) + } + } + if s.RoutingRules != nil { + for i, v := range s.RoutingRules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +const ( + // @enum BucketAccelerateStatus + BucketAccelerateStatusEnabled = "Enabled" + // @enum BucketAccelerateStatus + BucketAccelerateStatusSuspended = "Suspended" +) + const ( // @enum BucketCannedACL BucketCannedACLPrivate = "private" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go index c227f242c..846334723 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go @@ -6,32 +6,41 @@ import ( ) func init() { - initClient = func(c *client.Client) { - // Support building custom host-style bucket endpoints - c.Handlers.Build.PushFront(updateHostWithBucket) + initClient = defaultInitClientFn + initRequest = defaultInitRequestFn +} - // Require SSL when using SSE keys - c.Handlers.Validate.PushBack(validateSSERequiresSSL) - c.Handlers.Build.PushBack(computeSSEKeys) +func defaultInitClientFn(c *client.Client) { + // Support building custom endpoints based on config + c.Handlers.Build.PushFront(updateEndpointForS3Config) - // S3 uses custom error unmarshaling logic - c.Handlers.UnmarshalError.Clear() - c.Handlers.UnmarshalError.PushBack(unmarshalError) - } + // Require SSL when using SSE keys + c.Handlers.Validate.PushBack(validateSSERequiresSSL) + c.Handlers.Build.PushBack(computeSSEKeys) - initRequest = func(r *request.Request) { - switch r.Operation.Name { - case opPutBucketCors, opPutBucketLifecycle, opPutBucketPolicy, opPutBucketTagging, opDeleteObjects, opPutBucketLifecycleConfiguration: - // These S3 operations require Content-MD5 to be set - r.Handlers.Build.PushBack(contentMD5) - case opGetBucketLocation: - // GetBucketLocation has custom parsing logic - r.Handlers.Unmarshal.PushFront(buildGetBucketLocation) - case opCreateBucket: - // Auto-populate LocationConstraint with current region - r.Handlers.Validate.PushFront(populateLocationConstraint) - case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload: - r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError) - } + // S3 uses custom error unmarshaling logic + c.Handlers.UnmarshalError.Clear() + c.Handlers.UnmarshalError.PushBack(unmarshalError) +} + +func defaultInitRequestFn(r *request.Request) { + // Add reuest handlers for specific platforms. + // e.g. 100-continue support for PUT requests using Go 1.6 + platformRequestHandlers(r) + + switch r.Operation.Name { + case opPutBucketCors, opPutBucketLifecycle, opPutBucketPolicy, + opPutBucketTagging, opDeleteObjects, opPutBucketLifecycleConfiguration, + opPutBucketReplication: + // These S3 operations require Content-MD5 to be set + r.Handlers.Build.PushBack(contentMD5) + case opGetBucketLocation: + // GetBucketLocation has custom parsing logic + r.Handlers.Unmarshal.PushFront(buildGetBucketLocation) + case opCreateBucket: + // Auto-populate LocationConstraint with current region + r.Handlers.Validate.PushFront(populateLocationConstraint) + case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload: + r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError) } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go index b7cf4f9cc..517292903 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go @@ -1,14 +1,124 @@ package s3 import ( + "fmt" + "net/url" "regexp" "strings" "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/request" ) +// an operationBlacklist is a list of operation names that should a +// request handler should not be executed with. +type operationBlacklist []string + +// Continue will return true of the Request's operation name is not +// in the blacklist. False otherwise. +func (b operationBlacklist) Continue(r *request.Request) bool { + for i := 0; i < len(b); i++ { + if b[i] == r.Operation.Name { + return false + } + } + return true +} + +var accelerateOpBlacklist = operationBlacklist{ + opListBuckets, opCreateBucket, opDeleteBucket, +} + +// Request handler to automatically add the bucket name to the endpoint domain +// if possible. This style of bucket is valid for all bucket names which are +// DNS compatible and do not contain "." +func updateEndpointForS3Config(r *request.Request) { + forceHostStyle := aws.BoolValue(r.Config.S3ForcePathStyle) + accelerate := aws.BoolValue(r.Config.S3UseAccelerate) + + if accelerate && accelerateOpBlacklist.Continue(r) { + if forceHostStyle { + if r.Config.Logger != nil { + r.Config.Logger.Log("ERROR: aws.Config.S3UseAccelerate is not compatible with aws.Config.S3ForcePathStyle, ignoring S3ForcePathStyle.") + } + } + updateEndpointForAccelerate(r) + } else if !forceHostStyle && r.Operation.Name != opGetBucketLocation { + updateEndpointForHostStyle(r) + } +} + +func updateEndpointForHostStyle(r *request.Request) { + bucket, ok := bucketNameFromReqParams(r.Params) + if !ok { + // Ignore operation requests if the bucketname was not provided + // if this is an input validation error the validation handler + // will report it. + return + } + + if !hostCompatibleBucketName(r.HTTPRequest.URL, bucket) { + // bucket name must be valid to put into the host + return + } + + moveBucketToHost(r.HTTPRequest.URL, bucket) +} + +func updateEndpointForAccelerate(r *request.Request) { + bucket, ok := bucketNameFromReqParams(r.Params) + if !ok { + // Ignore operation requests if the bucketname was not provided + // if this is an input validation error the validation handler + // will report it. + return + } + + if !hostCompatibleBucketName(r.HTTPRequest.URL, bucket) { + r.Error = awserr.New("InvalidParameterException", + fmt.Sprintf("bucket name %s is not compatibile with S3 Accelerate", bucket), + nil) + return + } + + // Change endpoint from s3(-[a-z0-1-])?.amazonaws.com to s3-accelerate.amazonaws.com + r.HTTPRequest.URL.Host = replaceHostRegion(r.HTTPRequest.URL.Host, "accelerate") + moveBucketToHost(r.HTTPRequest.URL, bucket) +} + +// Attempts to retrieve the bucket name from the request input parameters. +// If no bucket is found, or the field is empty "", false will be returned. +func bucketNameFromReqParams(params interface{}) (string, bool) { + b, _ := awsutil.ValuesAtPath(params, "Bucket") + if len(b) == 0 { + return "", false + } + + if bucket, ok := b[0].(*string); ok { + if bucketStr := aws.StringValue(bucket); bucketStr != "" { + return bucketStr, true + } + } + + return "", false +} + +// hostCompatibleBucketName returns true if the request should +// put the bucket in the host. This is false if S3ForcePathStyle is +// explicitly set or if the bucket is not DNS compatible. +func hostCompatibleBucketName(u *url.URL, bucket string) bool { + // Bucket might be DNS compatible but dots in the hostname will fail + // certificate validation, so do not use host-style. + if u.Scheme == "https" && strings.Contains(bucket, ".") { + return false + } + + // if the bucket is DNS compatible + return dnsCompatibleBucketName(bucket) +} + var reDomain = regexp.MustCompile(`^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$`) var reIPAddress = regexp.MustCompile(`^(\d+\.){3}\d+$`) @@ -20,41 +130,36 @@ func dnsCompatibleBucketName(bucket string) bool { !strings.Contains(bucket, "..") } -// hostStyleBucketName returns true if the request should put the bucket in -// the host. This is false if S3ForcePathStyle is explicitly set or if the -// bucket is not DNS compatible. -func hostStyleBucketName(r *request.Request, bucket string) bool { - if aws.BoolValue(r.Config.S3ForcePathStyle) { - return false +// moveBucketToHost moves the bucket name from the URI path to URL host. +func moveBucketToHost(u *url.URL, bucket string) { + u.Host = bucket + "." + u.Host + u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1) + if u.Path == "" { + u.Path = "/" } - - // Bucket might be DNS compatible but dots in the hostname will fail - // certificate validation, so do not use host-style. - if r.HTTPRequest.URL.Scheme == "https" && strings.Contains(bucket, ".") { - return false - } - - // GetBucketLocation should be able to be called from any region within - // a partition, and return the associated region of the bucket. - if r.Operation.Name == opGetBucketLocation { - return false - } - - // Use host-style if the bucket is DNS compatible - return dnsCompatibleBucketName(bucket) } -func updateHostWithBucket(r *request.Request) { - b, _ := awsutil.ValuesAtPath(r.Params, "Bucket") - if len(b) == 0 { - return +const s3HostPrefix = "s3" + +// replaceHostRegion replaces the S3 region string in the host with the +// value provided. If v is empty the host prefix returned will be s3. +func replaceHostRegion(host, v string) string { + if !strings.HasPrefix(host, s3HostPrefix) { + return host } - if bucket := b[0].(*string); aws.StringValue(bucket) != "" && hostStyleBucketName(r, *bucket) { - r.HTTPRequest.URL.Host = *bucket + "." + r.HTTPRequest.URL.Host - r.HTTPRequest.URL.Path = strings.Replace(r.HTTPRequest.URL.Path, "/{Bucket}", "", -1) - if r.HTTPRequest.URL.Path == "" { - r.HTTPRequest.URL.Path = "/" + suffix := host[len(s3HostPrefix):] + for i := len(s3HostPrefix); i < len(host); i++ { + if host[i] == '.' { + // Trim until '.' leave the it in place. + suffix = host[i:] + break } } + + if len(v) == 0 { + return fmt.Sprintf("s3%s", suffix) + } + + return fmt.Sprintf("s3-%s%s", v, suffix) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go new file mode 100644 index 000000000..8e6f3307d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go @@ -0,0 +1,8 @@ +// +build !go1.6 + +package s3 + +import "github.com/aws/aws-sdk-go/aws/request" + +func platformRequestHandlers(r *request.Request) { +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go new file mode 100644 index 000000000..14d05f7b7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go @@ -0,0 +1,28 @@ +// +build go1.6 + +package s3 + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +func platformRequestHandlers(r *request.Request) { + if r.Operation.HTTPMethod == "PUT" { + // 100-Continue should only be used on put requests. + r.Handlers.Sign.PushBack(add100Continue) + } +} + +func add100Continue(r *request.Request) { + if aws.BoolValue(r.Config.S3Disable100Continue) { + return + } + if r.HTTPRequest.ContentLength < 1024*1024*2 { + // Ignore requests smaller than 2MB. This helps prevent delaying + // requests unnecessarily. + return + } + + r.HTTPRequest.Header.Set("Expect", "100-Continue") +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go index d664338bb..51f2f35cb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go @@ -4,6 +4,8 @@ package sns import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" @@ -893,6 +895,28 @@ func (s AddPermissionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddPermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"} + if s.AWSAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AWSAccountId")) + } + if s.ActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ActionName")) + } + if s.Label == nil { + invalidParams.Add(request.NewErrParamRequired("Label")) + } + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddPermissionOutput struct { _ struct{} `type:"structure"` } @@ -934,6 +958,22 @@ func (s ConfirmSubscriptionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfirmSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfirmSubscriptionInput"} + if s.Token == nil { + invalidParams.Add(request.NewErrParamRequired("Token")) + } + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for ConfirmSubscriptions action. type ConfirmSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -979,6 +1019,25 @@ func (s CreatePlatformApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePlatformApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePlatformApplicationInput"} + if s.Attributes == nil { + invalidParams.Add(request.NewErrParamRequired("Attributes")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Platform == nil { + invalidParams.Add(request.NewErrParamRequired("Platform")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response from CreatePlatformApplication action. type CreatePlatformApplicationOutput struct { _ struct{} `type:"structure"` @@ -1030,6 +1089,22 @@ func (s CreatePlatformEndpointInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePlatformEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePlatformEndpointInput"} + if s.PlatformApplicationArn == nil { + invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) + } + if s.Token == nil { + invalidParams.Add(request.NewErrParamRequired("Token")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response from CreateEndpoint action. type CreatePlatformEndpointOutput struct { _ struct{} `type:"structure"` @@ -1070,6 +1145,19 @@ func (s CreateTopicInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTopicInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTopicInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response from CreateTopic action. type CreateTopicOutput struct { _ struct{} `type:"structure"` @@ -1106,6 +1194,19 @@ func (s DeleteEndpointInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} + if s.EndpointArn == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteEndpointOutput struct { _ struct{} `type:"structure"` } @@ -1138,6 +1239,19 @@ func (s DeletePlatformApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePlatformApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePlatformApplicationInput"} + if s.PlatformApplicationArn == nil { + invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeletePlatformApplicationOutput struct { _ struct{} `type:"structure"` } @@ -1169,6 +1283,19 @@ func (s DeleteTopicInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTopicInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTopicInput"} + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteTopicOutput struct { _ struct{} `type:"structure"` } @@ -1222,6 +1349,19 @@ func (s GetEndpointAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEndpointAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEndpointAttributesInput"} + if s.EndpointArn == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response from GetEndpointAttributes of the EndpointArn. type GetEndpointAttributesOutput struct { _ struct{} `type:"structure"` @@ -1268,6 +1408,19 @@ func (s GetPlatformApplicationAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPlatformApplicationAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPlatformApplicationAttributesInput"} + if s.PlatformApplicationArn == nil { + invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for GetPlatformApplicationAttributes action. type GetPlatformApplicationAttributesOutput struct { _ struct{} `type:"structure"` @@ -1312,6 +1465,19 @@ func (s GetSubscriptionAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSubscriptionAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSubscriptionAttributesInput"} + if s.SubscriptionArn == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for GetSubscriptionAttributes action. type GetSubscriptionAttributesOutput struct { _ struct{} `type:"structure"` @@ -1357,6 +1523,19 @@ func (s GetTopicAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTopicAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTopicAttributesInput"} + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for GetTopicAttributes action. type GetTopicAttributesOutput struct { _ struct{} `type:"structure"` @@ -1409,6 +1588,19 @@ func (s ListEndpointsByPlatformApplicationInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEndpointsByPlatformApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEndpointsByPlatformApplicationInput"} + if s.PlatformApplicationArn == nil { + invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for ListEndpointsByPlatformApplication action. type ListEndpointsByPlatformApplicationOutput struct { _ struct{} `type:"structure"` @@ -1493,6 +1685,19 @@ func (s ListSubscriptionsByTopicInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSubscriptionsByTopicInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSubscriptionsByTopicInput"} + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for ListSubscriptionsByTopic action. type ListSubscriptionsByTopicOutput struct { _ struct{} `type:"structure"` @@ -1631,6 +1836,19 @@ func (s MessageAttributeValue) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *MessageAttributeValue) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MessageAttributeValue"} + if s.DataType == nil { + invalidParams.Add(request.NewErrParamRequired("DataType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Platform application object. type PlatformApplication struct { _ struct{} `type:"structure"` @@ -1729,6 +1947,29 @@ func (s PublishInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PublishInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PublishInput"} + if s.Message == nil { + invalidParams.Add(request.NewErrParamRequired("Message")) + } + if s.MessageAttributes != nil { + for i, v := range s.MessageAttributes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MessageAttributes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for Publish action. type PublishOutput struct { _ struct{} `type:"structure"` @@ -1770,6 +2011,22 @@ func (s RemovePermissionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemovePermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} + if s.Label == nil { + invalidParams.Add(request.NewErrParamRequired("Label")) + } + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemovePermissionOutput struct { _ struct{} `type:"structure"` } @@ -1815,6 +2072,22 @@ func (s SetEndpointAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetEndpointAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetEndpointAttributesInput"} + if s.Attributes == nil { + invalidParams.Add(request.NewErrParamRequired("Attributes")) + } + if s.EndpointArn == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetEndpointAttributesOutput struct { _ struct{} `type:"structure"` } @@ -1864,6 +2137,22 @@ func (s SetPlatformApplicationAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetPlatformApplicationAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetPlatformApplicationAttributesInput"} + if s.Attributes == nil { + invalidParams.Add(request.NewErrParamRequired("Attributes")) + } + if s.PlatformApplicationArn == nil { + invalidParams.Add(request.NewErrParamRequired("PlatformApplicationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetPlatformApplicationAttributesOutput struct { _ struct{} `type:"structure"` } @@ -1905,6 +2194,22 @@ func (s SetSubscriptionAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetSubscriptionAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetSubscriptionAttributesInput"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.SubscriptionArn == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetSubscriptionAttributesOutput struct { _ struct{} `type:"structure"` } @@ -1946,6 +2251,22 @@ func (s SetTopicAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetTopicAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetTopicAttributesInput"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetTopicAttributesOutput struct { _ struct{} `type:"structure"` } @@ -1999,6 +2320,22 @@ func (s SubscribeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SubscribeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SubscribeInput"} + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.TopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("TopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Response for Subscribe action. type SubscribeOutput struct { _ struct{} `type:"structure"` @@ -2085,6 +2422,19 @@ func (s UnsubscribeInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnsubscribeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnsubscribeInput"} + if s.SubscriptionArn == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type UnsubscribeOutput struct { _ struct{} `type:"structure"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go index 103abb3c8..5d3fea658 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go @@ -4,6 +4,8 @@ package sqs import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" @@ -781,6 +783,28 @@ func (s AddPermissionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddPermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"} + if s.AWSAccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AWSAccountIds")) + } + if s.Actions == nil { + invalidParams.Add(request.NewErrParamRequired("Actions")) + } + if s.Label == nil { + invalidParams.Add(request.NewErrParamRequired("Label")) + } + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type AddPermissionOutput struct { _ struct{} `type:"structure"` } @@ -844,6 +868,32 @@ func (s ChangeMessageVisibilityBatchInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChangeMessageVisibilityBatchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChangeMessageVisibilityBatchInput"} + if s.Entries == nil { + invalidParams.Add(request.NewErrParamRequired("Entries")) + } + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.Entries != nil { + for i, v := range s.Entries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // For each message in the batch, the response contains a ChangeMessageVisibilityBatchResultEntry // tag if the message succeeds or a BatchResultErrorEntry tag if the message // fails. @@ -902,6 +952,22 @@ func (s ChangeMessageVisibilityBatchRequestEntry) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChangeMessageVisibilityBatchRequestEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChangeMessageVisibilityBatchRequestEntry"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.ReceiptHandle == nil { + invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Encloses the id of an entry in ChangeMessageVisibilityBatch. type ChangeMessageVisibilityBatchResultEntry struct { _ struct{} `type:"structure"` @@ -945,6 +1011,25 @@ func (s ChangeMessageVisibilityInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChangeMessageVisibilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChangeMessageVisibilityInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.ReceiptHandle == nil { + invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) + } + if s.VisibilityTimeout == nil { + invalidParams.Add(request.NewErrParamRequired("VisibilityTimeout")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type ChangeMessageVisibilityOutput struct { _ struct{} `type:"structure"` } @@ -1000,6 +1085,19 @@ func (s CreateQueueInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateQueueInput"} + if s.QueueName == nil { + invalidParams.Add(request.NewErrParamRequired("QueueName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Returns the QueueUrl element of the created queue. type CreateQueueOutput struct { _ struct{} `type:"structure"` @@ -1038,6 +1136,32 @@ func (s DeleteMessageBatchInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMessageBatchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMessageBatchInput"} + if s.Entries == nil { + invalidParams.Add(request.NewErrParamRequired("Entries")) + } + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.Entries != nil { + for i, v := range s.Entries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // For each message in the batch, the response contains a DeleteMessageBatchResultEntry // tag if the message is deleted or a BatchResultErrorEntry tag if the message // cannot be deleted. @@ -1084,6 +1208,22 @@ func (s DeleteMessageBatchRequestEntry) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMessageBatchRequestEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMessageBatchRequestEntry"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.ReceiptHandle == nil { + invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Encloses the id an entry in DeleteMessageBatch. type DeleteMessageBatchResultEntry struct { _ struct{} `type:"structure"` @@ -1122,6 +1262,22 @@ func (s DeleteMessageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMessageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMessageInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.ReceiptHandle == nil { + invalidParams.Add(request.NewErrParamRequired("ReceiptHandle")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteMessageOutput struct { _ struct{} `type:"structure"` } @@ -1153,6 +1309,19 @@ func (s DeleteQueueInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteQueueInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type DeleteQueueOutput struct { _ struct{} `type:"structure"` } @@ -1187,6 +1356,19 @@ func (s GetQueueAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetQueueAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetQueueAttributesInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A list of returned queue attributes. type GetQueueAttributesOutput struct { _ struct{} `type:"structure"` @@ -1226,6 +1408,19 @@ func (s GetQueueUrlInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetQueueUrlInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetQueueUrlInput"} + if s.QueueName == nil { + invalidParams.Add(request.NewErrParamRequired("QueueName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // For more information, see Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/UnderstandingResponses.html) // in the Amazon SQS Developer Guide. type GetQueueUrlOutput struct { @@ -1262,6 +1457,19 @@ func (s ListDeadLetterSourceQueuesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeadLetterSourceQueuesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeadLetterSourceQueuesInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A list of your dead letter source queues. type ListDeadLetterSourceQueuesOutput struct { _ struct{} `type:"structure"` @@ -1406,6 +1614,19 @@ func (s MessageAttributeValue) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *MessageAttributeValue) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MessageAttributeValue"} + if s.DataType == nil { + invalidParams.Add(request.NewErrParamRequired("DataType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PurgeQueueInput struct { _ struct{} `type:"structure"` @@ -1424,6 +1645,19 @@ func (s PurgeQueueInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurgeQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurgeQueueInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type PurgeQueueOutput struct { _ struct{} `type:"structure"` } @@ -1500,6 +1734,19 @@ func (s ReceiveMessageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReceiveMessageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReceiveMessageInput"} + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // A list of received messages. type ReceiveMessageOutput struct { _ struct{} `type:"structure"` @@ -1539,6 +1786,22 @@ func (s RemovePermissionInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemovePermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} + if s.Label == nil { + invalidParams.Add(request.NewErrParamRequired("Label")) + } + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type RemovePermissionOutput struct { _ struct{} `type:"structure"` } @@ -1573,6 +1836,32 @@ func (s SendMessageBatchInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendMessageBatchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendMessageBatchInput"} + if s.Entries == nil { + invalidParams.Add(request.NewErrParamRequired("Entries")) + } + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.Entries != nil { + for i, v := range s.Entries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // For each message in the batch, the response contains a SendMessageBatchResultEntry // tag if the message succeeds or a BatchResultErrorEntry tag if the message // fails. @@ -1627,6 +1916,32 @@ func (s SendMessageBatchRequestEntry) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendMessageBatchRequestEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendMessageBatchRequestEntry"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.MessageBody == nil { + invalidParams.Add(request.NewErrParamRequired("MessageBody")) + } + if s.MessageAttributes != nil { + for i, v := range s.MessageAttributes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MessageAttributes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // Encloses a message ID for successfully enqueued message of a SendMessageBatch. type SendMessageBatchResultEntry struct { _ struct{} `type:"structure"` @@ -1691,6 +2006,32 @@ func (s SendMessageInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendMessageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendMessageInput"} + if s.MessageBody == nil { + invalidParams.Add(request.NewErrParamRequired("MessageBody")) + } + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + if s.MessageAttributes != nil { + for i, v := range s.MessageAttributes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MessageAttributes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // The MD5OfMessageBody and MessageId elements. type SendMessageOutput struct { _ struct{} `type:"structure"` @@ -1766,6 +2107,22 @@ func (s SetQueueAttributesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetQueueAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetQueueAttributesInput"} + if s.Attributes == nil { + invalidParams.Add(request.NewErrParamRequired("Attributes")) + } + if s.QueueUrl == nil { + invalidParams.Add(request.NewErrParamRequired("QueueUrl")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + type SetQueueAttributesOutput struct { _ struct{} `type:"structure"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go new file mode 100644 index 000000000..35a098166 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -0,0 +1,1478 @@ +// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. + +// Package sts provides a client for AWS Security Token Service. +package sts + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opAssumeRole = "AssumeRole" + +// AssumeRoleRequest generates a request for the AssumeRole operation. +func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) { + op := &request.Operation{ + Name: opAssumeRole, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssumeRoleInput{} + } + + req = c.newRequest(op, input, output) + output = &AssumeRoleOutput{} + req.Data = output + return +} + +// Returns a set of temporary security credentials (consisting of an access +// key ID, a secret access key, and a security token) that you can use to access +// AWS resources that you might not normally have access to. Typically, you +// use AssumeRole for cross-account access or federation. For a comparison of +// AssumeRole with the other APIs that produce temporary credentials, see Requesting +// Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// in the IAM User Guide. +// +// Important: You cannot call AssumeRole by using AWS root account credentials; +// access is denied. You must use IAM user credentials or temporary security +// credentials to call AssumeRole. +// +// For cross-account access, imagine that you own multiple accounts and need +// to access resources in each account. You could create long-term credentials +// in each account to access those resources. However, managing all those credentials +// and remembering which one can access which account can be time consuming. +// Instead, you can create one set of long-term credentials in one account and +// then use temporary security credentials to access all the other accounts +// by assuming roles in those accounts. For more information about roles, see +// IAM Roles (Delegation and Federation) (http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) +// in the IAM User Guide. +// +// For federation, you can, for example, grant single sign-on access to the +// AWS Management Console. If you already have an identity and authentication +// system in your corporate network, you don't have to recreate user identities +// in AWS in order to grant those user identities access to AWS. Instead, after +// a user has been authenticated, you call AssumeRole (and specify the role +// with the appropriate permissions) to get temporary security credentials for +// that user. With those temporary security credentials, you construct a sign-in +// URL that users can use to access the console. For more information, see Common +// Scenarios for Temporary Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html#sts-introduction) +// in the IAM User Guide. +// +// The temporary security credentials are valid for the duration that you specified +// when calling AssumeRole, which can be from 900 seconds (15 minutes) to a +// maximum of 3600 seconds (1 hour). The default is 1 hour. +// +// The temporary security credentials created by AssumeRole can be used to +// make API calls to any AWS service with the following exception: you cannot +// call the STS service's GetFederationToken or GetSessionToken APIs. +// +// Optionally, you can pass an IAM access policy to this operation. If you +// choose not to pass a policy, the temporary security credentials that are +// returned by the operation have the permissions that are defined in the access +// policy of the role that is being assumed. If you pass a policy to this operation, +// the temporary security credentials that are returned by the operation have +// the permissions that are allowed by both the access policy of the role that +// is being assumed, and the policy that you pass. This gives you a way to +// further restrict the permissions for the resulting temporary security credentials. +// You cannot use the passed policy to grant permissions that are in excess +// of those allowed by the access policy of the role that is being assumed. +// For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, +// and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) +// in the IAM User Guide. +// +// To assume a role, your AWS account must be trusted by the role. The trust +// relationship is defined in the role's trust policy when the role is created. +// That trust policy states which accounts are allowed to delegate access to +// this account's role. +// +// The user who wants to access the role must also have permissions delegated +// from the role's administrator. If the user is in a different account than +// the role, then the user's administrator must attach a policy that allows +// the user to call AssumeRole on the ARN of the role in the other account. +// If the user is in the same account as the role, then you can either attach +// a policy to the user (identical to the previous different account user), +// or you can add the user as a principal directly in the role's trust policy +// +// Using MFA with AssumeRole +// +// You can optionally include multi-factor authentication (MFA) information +// when you call AssumeRole. This is useful for cross-account scenarios in which +// you want to make sure that the user who is assuming the role has been authenticated +// using an AWS MFA device. In that scenario, the trust policy of the role being +// assumed includes a condition that tests for MFA authentication; if the caller +// does not include valid MFA information, the request to assume the role is +// denied. The condition in a trust policy that tests for MFA authentication +// might look like the following example. +// +// "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}} +// +// For more information, see Configuring MFA-Protected API Access (http://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html) +// in the IAM User Guide guide. +// +// To use MFA with AssumeRole, you pass values for the SerialNumber and TokenCode +// parameters. The SerialNumber value identifies the user's hardware or virtual +// MFA device. The TokenCode is the time-based one-time password (TOTP) that +// the MFA devices produces. +func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) { + req, out := c.AssumeRoleRequest(input) + err := req.Send() + return out, err +} + +const opAssumeRoleWithSAML = "AssumeRoleWithSAML" + +// AssumeRoleWithSAMLRequest generates a request for the AssumeRoleWithSAML operation. +func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) { + op := &request.Operation{ + Name: opAssumeRoleWithSAML, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssumeRoleWithSAMLInput{} + } + + req = c.newRequest(op, input, output) + output = &AssumeRoleWithSAMLOutput{} + req.Data = output + return +} + +// Returns a set of temporary security credentials for users who have been authenticated +// via a SAML authentication response. This operation provides a mechanism for +// tying an enterprise identity store or directory to role-based AWS access +// without user-specific credentials or configuration. For a comparison of AssumeRoleWithSAML +// with the other APIs that produce temporary credentials, see Requesting Temporary +// Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// in the IAM User Guide. +// +// The temporary security credentials returned by this operation consist of +// an access key ID, a secret access key, and a security token. Applications +// can use these temporary security credentials to sign calls to AWS services. +// +// The temporary security credentials are valid for the duration that you specified +// when calling AssumeRole, or until the time specified in the SAML authentication +// response's SessionNotOnOrAfter value, whichever is shorter. The duration +// can be from 900 seconds (15 minutes) to a maximum of 3600 seconds (1 hour). +// The default is 1 hour. +// +// The temporary security credentials created by AssumeRoleWithSAML can be +// used to make API calls to any AWS service with the following exception: you +// cannot call the STS service's GetFederationToken or GetSessionToken APIs. +// +// Optionally, you can pass an IAM access policy to this operation. If you +// choose not to pass a policy, the temporary security credentials that are +// returned by the operation have the permissions that are defined in the access +// policy of the role that is being assumed. If you pass a policy to this operation, +// the temporary security credentials that are returned by the operation have +// the permissions that are allowed by both the access policy of the role that +// is being assumed, and the policy that you pass. This gives you a way to +// further restrict the permissions for the resulting temporary security credentials. +// You cannot use the passed policy to grant permissions that are in excess +// of those allowed by the access policy of the role that is being assumed. +// For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, +// and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) +// in the IAM User Guide. +// +// Before your application can call AssumeRoleWithSAML, you must configure +// your SAML identity provider (IdP) to issue the claims required by AWS. Additionally, +// you must use AWS Identity and Access Management (IAM) to create a SAML provider +// entity in your AWS account that represents your identity provider, and create +// an IAM role that specifies this SAML provider in its trust policy. +// +// Calling AssumeRoleWithSAML does not require the use of AWS security credentials. +// The identity of the caller is validated by using keys in the metadata document +// that is uploaded for the SAML provider entity for your identity provider. +// +// Calling AssumeRoleWithSAML can result in an entry in your AWS CloudTrail +// logs. The entry includes the value in the NameID element of the SAML assertion. +// We recommend that you use a NameIDType that is not associated with any personally +// identifiable information (PII). For example, you could instead use the Persistent +// Identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent). +// +// For more information, see the following resources: +// +// About SAML 2.0-based Federation (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) +// in the IAM User Guide. +// +// Creating SAML Identity Providers (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html) +// in the IAM User Guide. +// +// Configuring a Relying Party and Claims (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html) +// in the IAM User Guide. +// +// Creating a Role for SAML 2.0 Federation (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html) +// in the IAM User Guide. +func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) { + req, out := c.AssumeRoleWithSAMLRequest(input) + err := req.Send() + return out, err +} + +const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" + +// AssumeRoleWithWebIdentityRequest generates a request for the AssumeRoleWithWebIdentity operation. +func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) { + op := &request.Operation{ + Name: opAssumeRoleWithWebIdentity, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssumeRoleWithWebIdentityInput{} + } + + req = c.newRequest(op, input, output) + output = &AssumeRoleWithWebIdentityOutput{} + req.Data = output + return +} + +// Returns a set of temporary security credentials for users who have been authenticated +// in a mobile or web application with a web identity provider, such as Amazon +// Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible +// identity provider. +// +// For mobile applications, we recommend that you use Amazon Cognito. You +// can use Amazon Cognito with the AWS SDK for iOS (http://aws.amazon.com/sdkforios/) +// and the AWS SDK for Android (http://aws.amazon.com/sdkforandroid/) to uniquely +// identify a user and supply the user with a consistent identity throughout +// the lifetime of an application. +// +// To learn more about Amazon Cognito, see Amazon Cognito Overview (http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840) +// in the AWS SDK for Android Developer Guide guide and Amazon Cognito Overview +// (http://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664) +// in the AWS SDK for iOS Developer Guide. +// +// Calling AssumeRoleWithWebIdentity does not require the use of AWS security +// credentials. Therefore, you can distribute an application (for example, on +// mobile devices) that requests temporary security credentials without including +// long-term AWS credentials in the application, and without deploying server-based +// proxy services that use long-term AWS credentials. Instead, the identity +// of the caller is validated by using a token from the web identity provider. +// For a comparison of AssumeRoleWithWebIdentity with the other APIs that produce +// temporary credentials, see Requesting Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// in the IAM User Guide. +// +// The temporary security credentials returned by this API consist of an access +// key ID, a secret access key, and a security token. Applications can use these +// temporary security credentials to sign calls to AWS service APIs. +// +// The credentials are valid for the duration that you specified when calling +// AssumeRoleWithWebIdentity, which can be from 900 seconds (15 minutes) to +// a maximum of 3600 seconds (1 hour). The default is 1 hour. +// +// The temporary security credentials created by AssumeRoleWithWebIdentity +// can be used to make API calls to any AWS service with the following exception: +// you cannot call the STS service's GetFederationToken or GetSessionToken APIs. +// +// Optionally, you can pass an IAM access policy to this operation. If you +// choose not to pass a policy, the temporary security credentials that are +// returned by the operation have the permissions that are defined in the access +// policy of the role that is being assumed. If you pass a policy to this operation, +// the temporary security credentials that are returned by the operation have +// the permissions that are allowed by both the access policy of the role that +// is being assumed, and the policy that you pass. This gives you a way to +// further restrict the permissions for the resulting temporary security credentials. +// You cannot use the passed policy to grant permissions that are in excess +// of those allowed by the access policy of the role that is being assumed. +// For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, +// and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) +// in the IAM User Guide. +// +// Before your application can call AssumeRoleWithWebIdentity, you must have +// an identity token from a supported identity provider and create a role that +// the application can assume. The role that your application assumes must trust +// the identity provider that is associated with the identity token. In other +// words, the identity provider must be specified in the role's trust policy. +// +// Calling AssumeRoleWithWebIdentity can result in an entry in your AWS CloudTrail +// logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims) +// of the provided Web Identity Token. We recommend that you avoid using any +// personally identifiable information (PII) in this field. For example, you +// could instead use a GUID or a pairwise identifier, as suggested in the OIDC +// specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes). +// +// For more information about how to use web identity federation and the AssumeRoleWithWebIdentity +// API, see the following resources: +// +// Using Web Identity Federation APIs for Mobile Apps (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual) +// and Federation Through a Web-based Identity Provider (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity). +// +// Web Identity Federation Playground (https://web-identity-federation-playground.s3.amazonaws.com/index.html). +// This interactive website lets you walk through the process of authenticating +// via Login with Amazon, Facebook, or Google, getting temporary security credentials, +// and then using those credentials to make a request to AWS. +// +// AWS SDK for iOS (http://aws.amazon.com/sdkforios/) and AWS SDK for Android +// (http://aws.amazon.com/sdkforandroid/). These toolkits contain sample apps +// that show how to invoke the identity providers, and then how to use the information +// from these providers to get and use temporary security credentials. +// +// Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/4617974389850313). +// This article discusses web identity federation and shows an example of how +// to use web identity federation to get access to content in Amazon S3. +func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) { + req, out := c.AssumeRoleWithWebIdentityRequest(input) + err := req.Send() + return out, err +} + +const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" + +// DecodeAuthorizationMessageRequest generates a request for the DecodeAuthorizationMessage operation. +func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) { + op := &request.Operation{ + Name: opDecodeAuthorizationMessage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DecodeAuthorizationMessageInput{} + } + + req = c.newRequest(op, input, output) + output = &DecodeAuthorizationMessageOutput{} + req.Data = output + return +} + +// Decodes additional information about the authorization status of a request +// from an encoded message returned in response to an AWS request. +// +// For example, if a user is not authorized to perform an action that he or +// she has requested, the request returns a Client.UnauthorizedOperation response +// (an HTTP 403 response). Some AWS actions additionally return an encoded message +// that can provide details about this authorization failure. +// +// Only certain AWS actions return an encoded authorization message. The documentation +// for an individual action indicates whether that action returns an encoded +// message in addition to returning an HTTP code. +// +// The message is encoded because the details of the authorization status +// can constitute privileged information that the user who requested the action +// should not see. To decode an authorization status message, a user must be +// granted permissions via an IAM policy to request the DecodeAuthorizationMessage +// (sts:DecodeAuthorizationMessage) action. +// +// The decoded message includes the following type of information: +// +// Whether the request was denied due to an explicit deny or due to the absence +// of an explicit allow. For more information, see Determining Whether a Request +// is Allowed or Denied (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow) +// in the IAM User Guide. +// +// The principal who made the request. +// +// The requested action. +// +// The requested resource. +// +// The values of condition keys in the context of the user's request. +func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) { + req, out := c.DecodeAuthorizationMessageRequest(input) + err := req.Send() + return out, err +} + +const opGetCallerIdentity = "GetCallerIdentity" + +// GetCallerIdentityRequest generates a request for the GetCallerIdentity operation. +func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) { + op := &request.Operation{ + Name: opGetCallerIdentity, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCallerIdentityInput{} + } + + req = c.newRequest(op, input, output) + output = &GetCallerIdentityOutput{} + req.Data = output + return +} + +// Returns details about the IAM identity whose credentials are used to call +// the API. +func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) { + req, out := c.GetCallerIdentityRequest(input) + err := req.Send() + return out, err +} + +const opGetFederationToken = "GetFederationToken" + +// GetFederationTokenRequest generates a request for the GetFederationToken operation. +func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) { + op := &request.Operation{ + Name: opGetFederationToken, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetFederationTokenInput{} + } + + req = c.newRequest(op, input, output) + output = &GetFederationTokenOutput{} + req.Data = output + return +} + +// Returns a set of temporary security credentials (consisting of an access +// key ID, a secret access key, and a security token) for a federated user. +// A typical use is in a proxy application that gets temporary security credentials +// on behalf of distributed applications inside a corporate network. Because +// you must call the GetFederationToken action using the long-term security +// credentials of an IAM user, this call is appropriate in contexts where those +// credentials can be safely stored, usually in a server-based application. +// For a comparison of GetFederationToken with the other APIs that produce temporary +// credentials, see Requesting Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// in the IAM User Guide. +// +// If you are creating a mobile-based or browser-based app that can authenticate +// users using a web identity provider like Login with Amazon, Facebook, Google, +// or an OpenID Connect-compatible identity provider, we recommend that you +// use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity. +// For more information, see Federation Through a Web-based Identity Provider +// (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity). +// +// The GetFederationToken action must be called by using the long-term AWS +// security credentials of an IAM user. You can also call GetFederationToken +// using the security credentials of an AWS root account, but we do not recommended +// it. Instead, we recommend that you create an IAM user for the purpose of +// the proxy application and then attach a policy to the IAM user that limits +// federated users to only the actions and resources that they need access to. +// For more information, see IAM Best Practices (http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) +// in the IAM User Guide. +// +// The temporary security credentials that are obtained by using the long-term +// credentials of an IAM user are valid for the specified duration, from 900 +// seconds (15 minutes) up to a maximium of 129600 seconds (36 hours). The default +// is 43200 seconds (12 hours). Temporary credentials that are obtained by using +// AWS root account credentials have a maximum duration of 3600 seconds (1 hour). +// +// The temporary security credentials created by GetFederationToken can be +// used to make API calls to any AWS service with the following exceptions: +// +// You cannot use these credentials to call any IAM APIs. +// +// You cannot call any STS APIs. +// +// Permissions +// +// The permissions for the temporary security credentials returned by GetFederationToken +// are determined by a combination of the following: +// +// The policy or policies that are attached to the IAM user whose credentials +// are used to call GetFederationToken. +// +// The policy that is passed as a parameter in the call. +// +// The passed policy is attached to the temporary security credentials that +// result from the GetFederationToken API call--that is, to the federated user. +// When the federated user makes an AWS request, AWS evaluates the policy attached +// to the federated user in combination with the policy or policies attached +// to the IAM user whose credentials were used to call GetFederationToken. AWS +// allows the federated user's request only when both the federated user and +// the IAM user are explicitly allowed to perform the requested action. The +// passed policy cannot grant more permissions than those that are defined in +// the IAM user policy. +// +// A typical use case is that the permissions of the IAM user whose credentials +// are used to call GetFederationToken are designed to allow access to all the +// actions and resources that any federated user will need. Then, for individual +// users, you pass a policy to the operation that scopes down the permissions +// to a level that's appropriate to that individual user, using a policy that +// allows only a subset of permissions that are granted to the IAM user. +// +// If you do not pass a policy, the resulting temporary security credentials +// have no effective permissions. The only exception is when the temporary security +// credentials are used to access a resource that has a resource-based policy +// that specifically allows the federated user to access the resource. +// +// For more information about how permissions work, see Permissions for GetFederationToken +// (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html). +// For information about using GetFederationToken to create temporary security +// credentials, see GetFederationToken—Federation Through a Custom Identity +// Broker (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken). +func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) { + req, out := c.GetFederationTokenRequest(input) + err := req.Send() + return out, err +} + +const opGetSessionToken = "GetSessionToken" + +// GetSessionTokenRequest generates a request for the GetSessionToken operation. +func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) { + op := &request.Operation{ + Name: opGetSessionToken, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSessionTokenInput{} + } + + req = c.newRequest(op, input, output) + output = &GetSessionTokenOutput{} + req.Data = output + return +} + +// Returns a set of temporary credentials for an AWS account or IAM user. The +// credentials consist of an access key ID, a secret access key, and a security +// token. Typically, you use GetSessionToken if you want to use MFA to protect +// programmatic calls to specific AWS APIs like Amazon EC2 StopInstances. MFA-enabled +// IAM users would need to call GetSessionToken and submit an MFA code that +// is associated with their MFA device. Using the temporary security credentials +// that are returned from the call, IAM users can then make programmatic calls +// to APIs that require MFA authentication. If you do not supply a correct MFA +// code, then the API returns an access denied error. For a comparison of GetSessionToken +// with the other APIs that produce temporary credentials, see Requesting Temporary +// Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// in the IAM User Guide. +// +// The GetSessionToken action must be called by using the long-term AWS security +// credentials of the AWS account or an IAM user. Credentials that are created +// by IAM users are valid for the duration that you specify, from 900 seconds +// (15 minutes) up to a maximum of 129600 seconds (36 hours), with a default +// of 43200 seconds (12 hours); credentials that are created by using account +// credentials can range from 900 seconds (15 minutes) up to a maximum of 3600 +// seconds (1 hour), with a default of 1 hour. +// +// The temporary security credentials created by GetSessionToken can be used +// to make API calls to any AWS service with the following exceptions: +// +// You cannot call any IAM APIs unless MFA authentication information is +// included in the request. +// +// You cannot call any STS API except AssumeRole. +// +// We recommend that you do not call GetSessionToken with root account credentials. +// Instead, follow our best practices (http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users) +// by creating one or more IAM users, giving them the necessary permissions, +// and using IAM users for everyday interaction with AWS. +// +// The permissions associated with the temporary security credentials returned +// by GetSessionToken are based on the permissions associated with account or +// IAM user whose credentials are used to call the action. If GetSessionToken +// is called using root account credentials, the temporary credentials have +// root account permissions. Similarly, if GetSessionToken is called using the +// credentials of an IAM user, the temporary credentials have the same permissions +// as the IAM user. +// +// For more information about using GetSessionToken to create temporary credentials, +// go to Temporary Credentials for Users in Untrusted Environments (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken) +// in the IAM User Guide. +func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) { + req, out := c.GetSessionTokenRequest(input) + err := req.Send() + return out, err +} + +type AssumeRoleInput struct { + _ struct{} `type:"structure"` + + // The duration, in seconds, of the role session. The value can range from 900 + // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set + // to 3600 seconds. + DurationSeconds *int64 `min:"900" type:"integer"` + + // A unique identifier that is used by third parties when assuming roles in + // their customers' accounts. For each role that the third party can assume, + // they should instruct their customers to ensure the role's trust policy checks + // for the external ID that the third party generated. Each time the third party + // assumes the role, they should pass the customer's external ID. The external + // ID is useful in order to help third parties bind a role to the customer who + // created it. For more information about the external ID, see How to Use an + // External ID When Granting Access to Your AWS Resources to a Third Party (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) + // in the IAM User Guide. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters consisting of upper- and lower-case alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@:\/- + ExternalId *string `min:"2" type:"string"` + + // An IAM policy in JSON format. + // + // This parameter is optional. If you pass a policy, the temporary security + // credentials that are returned by the operation have the permissions that + // are allowed by both (the intersection of) the access policy of the role that + // is being assumed, and the policy that you pass. This gives you a way to further + // restrict the permissions for the resulting temporary security credentials. + // You cannot use the passed policy to grant permissions that are in excess + // of those allowed by the access policy of the role that is being assumed. + // For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, + // and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) + // in the IAM User Guide. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters up to 2048 characters in length. The characters can be any + // ASCII character from the space character to the end of the valid character + // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), + // and carriage return (\u000D) characters. + // + // The policy plain text must be 2048 bytes or shorter. However, an internal + // conversion compresses it into a packed binary format with a separate limit. + // The PackedPolicySize response element indicates by percentage how close to + // the upper size limit the policy is, with 100% equaling the maximum allowed + // size. + Policy *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the role to assume. + RoleArn *string `min:"20" type:"string" required:"true"` + + // An identifier for the assumed role session. + // + // Use the role session name to uniquely identify a session when the same role + // is assumed by different principals or for different reasons. In cross-account + // scenarios, the role session name is visible to, and can be logged by the + // account that owns the role. The role session name is also used in the ARN + // of the assumed role principal. This means that subsequent cross-account API + // requests using the temporary security credentials will expose the role session + // name to the external account in their CloudTrail logs. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters consisting of upper- and lower-case alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + RoleSessionName *string `min:"2" type:"string" required:"true"` + + // The identification number of the MFA device that is associated with the user + // who is making the AssumeRole call. Specify this value if the trust policy + // of the role being assumed includes a condition that requires MFA authentication. + // The value is either the serial number for a hardware device (such as GAHT12345678) + // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters consisting of upper- and lower-case alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + SerialNumber *string `min:"9" type:"string"` + + // The value provided by the MFA device, if the trust policy of the role being + // assumed requires MFA (that is, if the policy includes a condition that tests + // for MFA). If the role being assumed requires MFA and if the TokenCode value + // is missing or expired, the AssumeRole call returns an "access denied" error. + // + // The format for this parameter, as described by its regex pattern, is a sequence + // of six numeric digits. + TokenCode *string `min:"6" type:"string"` +} + +// String returns the string representation +func (s AssumeRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssumeRoleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssumeRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssumeRoleInput"} + if s.DurationSeconds != nil && *s.DurationSeconds < 900 { + invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) + } + if s.ExternalId != nil && len(*s.ExternalId) < 2 { + invalidParams.Add(request.NewErrParamMinLen("ExternalId", 2)) + } + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.RoleSessionName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleSessionName")) + } + if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2)) + } + if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { + invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) + } + if s.TokenCode != nil && len(*s.TokenCode) < 6 { + invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the response to a successful AssumeRole request, including temporary +// AWS credentials that can be used to make AWS requests. +type AssumeRoleOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers + // that you can use to refer to the resulting temporary security credentials. + // For example, you can reference these credentials as a principal in a resource-based + // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName + // that you specified when you called AssumeRole. + AssumedRoleUser *AssumedRoleUser `type:"structure"` + + // The temporary security credentials, which include an access key ID, a secret + // access key, and a security (or session) token. + // + // Note: The size of the security token that STS APIs return is not fixed. + // We strongly recommend that you make no assumptions about the maximum size. + // As of this writing, the typical size is less than 4096 bytes, but that can + // vary. Also, future updates to AWS might require larger sizes. + Credentials *Credentials `type:"structure"` + + // A percentage value that indicates the size of the policy in packed form. + // The service rejects any policy with a packed size greater than 100 percent, + // which means the policy exceeded the allowed space. + PackedPolicySize *int64 `type:"integer"` +} + +// String returns the string representation +func (s AssumeRoleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssumeRoleOutput) GoString() string { + return s.String() +} + +type AssumeRoleWithSAMLInput struct { + _ struct{} `type:"structure"` + + // The duration, in seconds, of the role session. The value can range from 900 + // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set + // to 3600 seconds. An expiration can also be specified in the SAML authentication + // response's SessionNotOnOrAfter value. The actual expiration time is whichever + // value is shorter. + // + // The maximum duration for a session is 1 hour, and the minimum duration + // is 15 minutes, even if values outside this range are specified. + DurationSeconds *int64 `min:"900" type:"integer"` + + // An IAM policy in JSON format. + // + // The policy parameter is optional. If you pass a policy, the temporary security + // credentials that are returned by the operation have the permissions that + // are allowed by both the access policy of the role that is being assumed, + // and the policy that you pass. This gives you a way to further restrict + // the permissions for the resulting temporary security credentials. You cannot + // use the passed policy to grant permissions that are in excess of those allowed + // by the access policy of the role that is being assumed. For more information, + // Permissions for AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity + // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) + // in the IAM User Guide. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters up to 2048 characters in length. The characters can be any + // ASCII character from the space character to the end of the valid character + // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), + // and carriage return (\u000D) characters. + // + // The policy plain text must be 2048 bytes or shorter. However, an internal + // conversion compresses it into a packed binary format with a separate limit. + // The PackedPolicySize response element indicates by percentage how close to + // the upper size limit the policy is, with 100% equaling the maximum allowed + // size. + Policy *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes + // the IdP. + PrincipalArn *string `min:"20" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the role that the caller is assuming. + RoleArn *string `min:"20" type:"string" required:"true"` + + // The base-64 encoded SAML authentication response provided by the IdP. + // + // For more information, see Configuring a Relying Party and Adding Claims + // (http://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html) + // in the Using IAM guide. + SAMLAssertion *string `min:"4" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssumeRoleWithSAMLInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssumeRoleWithSAMLInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssumeRoleWithSAMLInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithSAMLInput"} + if s.DurationSeconds != nil && *s.DurationSeconds < 900 { + invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) + } + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + if s.PrincipalArn == nil { + invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) + } + if s.PrincipalArn != nil && len(*s.PrincipalArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PrincipalArn", 20)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.SAMLAssertion == nil { + invalidParams.Add(request.NewErrParamRequired("SAMLAssertion")) + } + if s.SAMLAssertion != nil && len(*s.SAMLAssertion) < 4 { + invalidParams.Add(request.NewErrParamMinLen("SAMLAssertion", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the response to a successful AssumeRoleWithSAML request, including +// temporary AWS credentials that can be used to make AWS requests. +type AssumeRoleWithSAMLOutput struct { + _ struct{} `type:"structure"` + + // The identifiers for the temporary security credentials that the operation + // returns. + AssumedRoleUser *AssumedRoleUser `type:"structure"` + + // The value of the Recipient attribute of the SubjectConfirmationData element + // of the SAML assertion. + Audience *string `type:"string"` + + // The temporary security credentials, which include an access key ID, a secret + // access key, and a security (or session) token. + // + // Note: The size of the security token that STS APIs return is not fixed. + // We strongly recommend that you make no assumptions about the maximum size. + // As of this writing, the typical size is less than 4096 bytes, but that can + // vary. Also, future updates to AWS might require larger sizes. + Credentials *Credentials `type:"structure"` + + // The value of the Issuer element of the SAML assertion. + Issuer *string `type:"string"` + + // A hash value based on the concatenation of the Issuer response value, the + // AWS account ID, and the friendly name (the last part of the ARN) of the SAML + // provider in IAM. The combination of NameQualifier and Subject can be used + // to uniquely identify a federated user. + // + // The following pseudocode shows how the hash value is calculated: + // + // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" + // ) ) + NameQualifier *string `type:"string"` + + // A percentage value that indicates the size of the policy in packed form. + // The service rejects any policy with a packed size greater than 100 percent, + // which means the policy exceeded the allowed space. + PackedPolicySize *int64 `type:"integer"` + + // The value of the NameID element in the Subject element of the SAML assertion. + Subject *string `type:"string"` + + // The format of the name ID, as defined by the Format attribute in the NameID + // element of the SAML assertion. Typical examples of the format are transient + // or persistent. + // + // If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format, + // that prefix is removed. For example, urn:oasis:names:tc:SAML:2.0:nameid-format:transient + // is returned as transient. If the format includes any other prefix, the format + // is returned with no modifications. + SubjectType *string `type:"string"` +} + +// String returns the string representation +func (s AssumeRoleWithSAMLOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssumeRoleWithSAMLOutput) GoString() string { + return s.String() +} + +type AssumeRoleWithWebIdentityInput struct { + _ struct{} `type:"structure"` + + // The duration, in seconds, of the role session. The value can range from 900 + // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set + // to 3600 seconds. + DurationSeconds *int64 `min:"900" type:"integer"` + + // An IAM policy in JSON format. + // + // The policy parameter is optional. If you pass a policy, the temporary security + // credentials that are returned by the operation have the permissions that + // are allowed by both the access policy of the role that is being assumed, + // and the policy that you pass. This gives you a way to further restrict + // the permissions for the resulting temporary security credentials. You cannot + // use the passed policy to grant permissions that are in excess of those allowed + // by the access policy of the role that is being assumed. For more information, + // see Permissions for AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) + // in the IAM User Guide. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters up to 2048 characters in length. The characters can be any + // ASCII character from the space character to the end of the valid character + // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), + // and carriage return (\u000D) characters. + // + // The policy plain text must be 2048 bytes or shorter. However, an internal + // conversion compresses it into a packed binary format with a separate limit. + // The PackedPolicySize response element indicates by percentage how close to + // the upper size limit the policy is, with 100% equaling the maximum allowed + // size. + Policy *string `min:"1" type:"string"` + + // The fully qualified host component of the domain name of the identity provider. + // + // Specify this value only for OAuth 2.0 access tokens. Currently www.amazon.com + // and graph.facebook.com are the only supported identity providers for OAuth + // 2.0 access tokens. Do not include URL schemes and port numbers. + // + // Do not specify this value for OpenID Connect ID tokens. + ProviderId *string `min:"4" type:"string"` + + // The Amazon Resource Name (ARN) of the role that the caller is assuming. + RoleArn *string `min:"20" type:"string" required:"true"` + + // An identifier for the assumed role session. Typically, you pass the name + // or identifier that is associated with the user who is using your application. + // That way, the temporary security credentials that your application will use + // are associated with that user. This session name is included as part of the + // ARN and assumed role ID in the AssumedRoleUser response element. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters consisting of upper- and lower-case alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + RoleSessionName *string `min:"2" type:"string" required:"true"` + + // The OAuth 2.0 access token or OpenID Connect ID token that is provided by + // the identity provider. Your application must get this token by authenticating + // the user who is using your application with a web identity provider before + // the application makes an AssumeRoleWithWebIdentity call. + WebIdentityToken *string `min:"4" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssumeRoleWithWebIdentityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssumeRoleWithWebIdentityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssumeRoleWithWebIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithWebIdentityInput"} + if s.DurationSeconds != nil && *s.DurationSeconds < 900 { + invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) + } + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + if s.ProviderId != nil && len(*s.ProviderId) < 4 { + invalidParams.Add(request.NewErrParamMinLen("ProviderId", 4)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.RoleSessionName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleSessionName")) + } + if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2)) + } + if s.WebIdentityToken == nil { + invalidParams.Add(request.NewErrParamRequired("WebIdentityToken")) + } + if s.WebIdentityToken != nil && len(*s.WebIdentityToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("WebIdentityToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the response to a successful AssumeRoleWithWebIdentity request, +// including temporary AWS credentials that can be used to make AWS requests. +type AssumeRoleWithWebIdentityOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers + // that you can use to refer to the resulting temporary security credentials. + // For example, you can reference these credentials as a principal in a resource-based + // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName + // that you specified when you called AssumeRole. + AssumedRoleUser *AssumedRoleUser `type:"structure"` + + // The intended audience (also known as client ID) of the web identity token. + // This is traditionally the client identifier issued to the application that + // requested the web identity token. + Audience *string `type:"string"` + + // The temporary security credentials, which include an access key ID, a secret + // access key, and a security token. + // + // Note: The size of the security token that STS APIs return is not fixed. + // We strongly recommend that you make no assumptions about the maximum size. + // As of this writing, the typical size is less than 4096 bytes, but that can + // vary. Also, future updates to AWS might require larger sizes. + Credentials *Credentials `type:"structure"` + + // A percentage value that indicates the size of the policy in packed form. + // The service rejects any policy with a packed size greater than 100 percent, + // which means the policy exceeded the allowed space. + PackedPolicySize *int64 `type:"integer"` + + // The issuing authority of the web identity token presented. For OpenID Connect + // ID Tokens this contains the value of the iss field. For OAuth 2.0 access + // tokens, this contains the value of the ProviderId parameter that was passed + // in the AssumeRoleWithWebIdentity request. + Provider *string `type:"string"` + + // The unique user identifier that is returned by the identity provider. This + // identifier is associated with the WebIdentityToken that was submitted with + // the AssumeRoleWithWebIdentity call. The identifier is typically unique to + // the user and the application that acquired the WebIdentityToken (pairwise + // identifier). For OpenID Connect ID tokens, this field contains the value + // returned by the identity provider as the token's sub (Subject) claim. + SubjectFromWebIdentityToken *string `min:"6" type:"string"` +} + +// String returns the string representation +func (s AssumeRoleWithWebIdentityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssumeRoleWithWebIdentityOutput) GoString() string { + return s.String() +} + +// The identifiers for the temporary security credentials that the operation +// returns. +type AssumedRoleUser struct { + _ struct{} `type:"structure"` + + // The ARN of the temporary security credentials that are returned from the + // AssumeRole action. For more information about ARNs and how to use them in + // policies, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in Using IAM. + Arn *string `min:"20" type:"string" required:"true"` + + // A unique identifier that contains the role ID and the role session name of + // the role that is being assumed. The role ID is generated by AWS when the + // role is created. + AssumedRoleId *string `min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssumedRoleUser) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssumedRoleUser) GoString() string { + return s.String() +} + +// AWS credentials for API authentication. +type Credentials struct { + _ struct{} `type:"structure"` + + // The access key ID that identifies the temporary security credentials. + AccessKeyId *string `min:"16" type:"string" required:"true"` + + // The date on which the current credentials expire. + Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // The secret access key that can be used to sign requests. + SecretAccessKey *string `type:"string" required:"true"` + + // The token that users must pass to the service API to use the temporary credentials. + SessionToken *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Credentials) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Credentials) GoString() string { + return s.String() +} + +type DecodeAuthorizationMessageInput struct { + _ struct{} `type:"structure"` + + // The encoded message that was returned with the response. + EncodedMessage *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DecodeAuthorizationMessageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecodeAuthorizationMessageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DecodeAuthorizationMessageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecodeAuthorizationMessageInput"} + if s.EncodedMessage == nil { + invalidParams.Add(request.NewErrParamRequired("EncodedMessage")) + } + if s.EncodedMessage != nil && len(*s.EncodedMessage) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EncodedMessage", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// A document that contains additional information about the authorization status +// of a request from an encoded message that is returned in response to an AWS +// request. +type DecodeAuthorizationMessageOutput struct { + _ struct{} `type:"structure"` + + // An XML document that contains the decoded message. + DecodedMessage *string `type:"string"` +} + +// String returns the string representation +func (s DecodeAuthorizationMessageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecodeAuthorizationMessageOutput) GoString() string { + return s.String() +} + +// Identifiers for the federated user that is associated with the credentials. +type FederatedUser struct { + _ struct{} `type:"structure"` + + // The ARN that specifies the federated user that is associated with the credentials. + // For more information about ARNs and how to use them in policies, see IAM + // Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) + // in Using IAM. + Arn *string `min:"20" type:"string" required:"true"` + + // The string that identifies the federated user associated with the credentials, + // similar to the unique ID of an IAM user. + FederatedUserId *string `min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s FederatedUser) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FederatedUser) GoString() string { + return s.String() +} + +type GetCallerIdentityInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetCallerIdentityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCallerIdentityInput) GoString() string { + return s.String() +} + +// Contains the response to a successful GetCallerIdentity request, including +// information about the entity making the request. +type GetCallerIdentityOutput struct { + _ struct{} `type:"structure"` + + // The AWS account ID number of the account that owns or contains the calling + // entity. + Account *string `type:"string"` + + // The AWS ARN associated with the calling entity. + Arn *string `min:"20" type:"string"` + + // The unique identifier of the calling entity. The exact value depends on the + // type of entity making the call. The values returned are those listed in the + // aws:userid column in the Principal table (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable) + // found on the Policy Variables reference page in the IAM User Guide. + UserId *string `type:"string"` +} + +// String returns the string representation +func (s GetCallerIdentityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCallerIdentityOutput) GoString() string { + return s.String() +} + +type GetFederationTokenInput struct { + _ struct{} `type:"structure"` + + // The duration, in seconds, that the session should last. Acceptable durations + // for federation sessions range from 900 seconds (15 minutes) to 129600 seconds + // (36 hours), with 43200 seconds (12 hours) as the default. Sessions obtained + // using AWS account (root) credentials are restricted to a maximum of 3600 + // seconds (one hour). If the specified duration is longer than one hour, the + // session obtained by using AWS account (root) credentials defaults to one + // hour. + DurationSeconds *int64 `min:"900" type:"integer"` + + // The name of the federated user. The name is used as an identifier for the + // temporary security credentials (such as Bob). For example, you can reference + // the federated user name in a resource-based policy, such as in an Amazon + // S3 bucket policy. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters consisting of upper- and lower-case alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + Name *string `min:"2" type:"string" required:"true"` + + // An IAM policy in JSON format that is passed with the GetFederationToken call + // and evaluated along with the policy or policies that are attached to the + // IAM user whose credentials are used to call GetFederationToken. The passed + // policy is used to scope down the permissions that are available to the IAM + // user, by allowing only a subset of the permissions that are granted to the + // IAM user. The passed policy cannot grant more permissions than those granted + // to the IAM user. The final permissions for the federated user are the most + // restrictive set based on the intersection of the passed policy and the IAM + // user policy. + // + // If you do not pass a policy, the resulting temporary security credentials + // have no effective permissions. The only exception is when the temporary security + // credentials are used to access a resource that has a resource-based policy + // that specifically allows the federated user to access the resource. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters up to 2048 characters in length. The characters can be any + // ASCII character from the space character to the end of the valid character + // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), + // and carriage return (\u000D) characters. + // + // The policy plain text must be 2048 bytes or shorter. However, an internal + // conversion compresses it into a packed binary format with a separate limit. + // The PackedPolicySize response element indicates by percentage how close to + // the upper size limit the policy is, with 100% equaling the maximum allowed + // size. + // + // For more information about how permissions work, see Permissions for GetFederationToken + // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html). + Policy *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetFederationTokenInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFederationTokenInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFederationTokenInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFederationTokenInput"} + if s.DurationSeconds != nil && *s.DurationSeconds < 900 { + invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Name", 2)) + } + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the response to a successful GetFederationToken request, including +// temporary AWS credentials that can be used to make AWS requests. +type GetFederationTokenOutput struct { + _ struct{} `type:"structure"` + + // The temporary security credentials, which include an access key ID, a secret + // access key, and a security (or session) token. + // + // Note: The size of the security token that STS APIs return is not fixed. + // We strongly recommend that you make no assumptions about the maximum size. + // As of this writing, the typical size is less than 4096 bytes, but that can + // vary. Also, future updates to AWS might require larger sizes. + Credentials *Credentials `type:"structure"` + + // Identifiers for the federated user associated with the credentials (such + // as arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob). You + // can use the federated user's ARN in your resource-based policies, such as + // an Amazon S3 bucket policy. + FederatedUser *FederatedUser `type:"structure"` + + // A percentage value indicating the size of the policy in packed form. The + // service rejects policies for which the packed size is greater than 100 percent + // of the allowed value. + PackedPolicySize *int64 `type:"integer"` +} + +// String returns the string representation +func (s GetFederationTokenOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFederationTokenOutput) GoString() string { + return s.String() +} + +type GetSessionTokenInput struct { + _ struct{} `type:"structure"` + + // The duration, in seconds, that the credentials should remain valid. Acceptable + // durations for IAM user sessions range from 900 seconds (15 minutes) to 129600 + // seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions + // for AWS account owners are restricted to a maximum of 3600 seconds (one hour). + // If the duration is longer than one hour, the session for AWS account owners + // defaults to one hour. + DurationSeconds *int64 `min:"900" type:"integer"` + + // The identification number of the MFA device that is associated with the IAM + // user who is making the GetSessionToken call. Specify this value if the IAM + // user has a policy that requires MFA authentication. The value is either the + // serial number for a hardware device (such as GAHT12345678) or an Amazon Resource + // Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). + // You can find the device for an IAM user by going to the AWS Management Console + // and viewing the user's security credentials. + // + // The format for this parameter, as described by its regex pattern, is a string + // of characters consisting of upper- and lower-case alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + SerialNumber *string `min:"9" type:"string"` + + // The value provided by the MFA device, if MFA is required. If any policy requires + // the IAM user to submit an MFA code, specify this value. If MFA authentication + // is required, and the user does not provide a code when requesting a set of + // temporary security credentials, the user will receive an "access denied" + // response when requesting resources that require MFA authentication. + // + // The format for this parameter, as described by its regex pattern, is a sequence + // of six numeric digits. + TokenCode *string `min:"6" type:"string"` +} + +// String returns the string representation +func (s GetSessionTokenInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSessionTokenInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSessionTokenInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSessionTokenInput"} + if s.DurationSeconds != nil && *s.DurationSeconds < 900 { + invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) + } + if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { + invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) + } + if s.TokenCode != nil && len(*s.TokenCode) < 6 { + invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// Contains the response to a successful GetSessionToken request, including +// temporary AWS credentials that can be used to make AWS requests. +type GetSessionTokenOutput struct { + _ struct{} `type:"structure"` + + // The temporary security credentials, which include an access key ID, a secret + // access key, and a security (or session) token. + // + // Note: The size of the security token that STS APIs return is not fixed. + // We strongly recommend that you make no assumptions about the maximum size. + // As of this writing, the typical size is less than 4096 bytes, but that can + // vary. Also, future updates to AWS might require larger sizes. + Credentials *Credentials `type:"structure"` +} + +// String returns the string representation +func (s GetSessionTokenOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSessionTokenOutput) GoString() string { + return s.String() +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go new file mode 100644 index 000000000..4010cc7fa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go @@ -0,0 +1,12 @@ +package sts + +import "github.com/aws/aws-sdk-go/aws/request" + +func init() { + initRequest = func(r *request.Request) { + switch r.Operation.Name { + case opAssumeRoleWithSAML, opAssumeRoleWithWebIdentity: + r.Handlers.Sign.Clear() // these operations are unsigned + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go new file mode 100644 index 000000000..fbe3cff33 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go @@ -0,0 +1,130 @@ +// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. + +package sts + +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/private/protocol/query" + "github.com/aws/aws-sdk-go/private/signer/v4" +) + +// The AWS Security Token Service (STS) is a web service that enables you to +// request temporary, limited-privilege credentials for AWS Identity and Access +// Management (IAM) users or for users that you authenticate (federated users). +// This guide provides descriptions of the STS API. For more detailed information +// about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html). +// +// As an alternative to using the API, you can use one of the AWS SDKs, which +// consist of libraries and sample code for various programming languages and +// platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient +// way to create programmatic access to STS. For example, the SDKs take care +// of cryptographically signing requests, managing errors, and retrying requests +// automatically. For information about the AWS SDKs, including how to download +// and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/). +// +// For information about setting up signatures and authorization through the +// API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) +// in the AWS General Reference. For general information about the Query API, +// go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) +// in Using IAM. For information about using security tokens with other AWS +// products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) +// in the IAM User Guide. +// +// If you're new to AWS and need additional technical information about a specific +// AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/ +// (http://aws.amazon.com/documentation/). +// +// Endpoints +// +// The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com +// that maps to the US East (N. Virginia) region. Additional regions are available +// and are activated by default. For more information, see Activating and Deactivating +// AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// in the IAM User Guide. +// +// For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region) +// in the AWS General Reference. +// +// Recording API requests +// +// STS supports AWS CloudTrail, which is a service that records AWS calls for +// your AWS account and delivers log files to an Amazon S3 bucket. By using +// information collected by CloudTrail, you can determine what requests were +// successfully made to STS, who made the request, when it was made, and so +// on. To learn more about CloudTrail, including how to turn it on and find +// your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). +//The service client's operations are safe to be used concurrently. +// It is not safe to mutate any of the client's properties though. +type STS 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) + +// A ServiceName is the name of the service the client will make API calls to. +const ServiceName = "sts" + +// New creates a new instance of the STS client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a STS client from just a session. +// svc := sts.New(mySession) +// +// // Create a STS client with additional configuration +// svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS { + c := p.ClientConfig(ServiceName, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *STS { + svc := &STS{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2011-06-15", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBack(v4.Sign) + svc.Handlers.Build.PushBackNamed(query.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a STS operation and runs any +// custom request initialization. +func (c *STS) 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 +} From a23bcf2ec9231cf9e60388eac6eda179de116bad Mon Sep 17 00:00:00 2001 From: Kraig Amador Date: Wed, 27 Apr 2016 18:49:42 -0700 Subject: [PATCH 2/2] Added accountid to AWSClient and set it early in the initialization phase. We use iam.GetUser(nil) scattered around to get the account id, but this isn't the most reliable method. GetAccountId now uses one more method (sts:GetCallerIdentity) to get the account id, this works with federated users. --- builtin/providers/aws/auth_helpers.go | 17 ++++- builtin/providers/aws/auth_helpers_test.go | 87 +++++++++++++++++----- builtin/providers/aws/config.go | 25 ++++--- 3 files changed, 98 insertions(+), 31 deletions(-) diff --git a/builtin/providers/aws/auth_helpers.go b/builtin/providers/aws/auth_helpers.go index 914c7e971..552a4234f 100644 --- a/builtin/providers/aws/auth_helpers.go +++ b/builtin/providers/aws/auth_helpers.go @@ -14,10 +14,11 @@ import ( "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go/service/sts" "github.com/hashicorp/go-cleanhttp" ) -func GetAccountId(iamconn *iam.IAM, authProviderName string) (string, error) { +func GetAccountId(iamconn *iam.IAM, stsconn *sts.STS, authProviderName string) (string, error) { // If we have creds from instance profile, we can use metadata API if authProviderName == ec2rolecreds.ProviderName { log.Println("[DEBUG] Trying to get account ID via AWS Metadata API") @@ -42,16 +43,24 @@ func GetAccountId(iamconn *iam.IAM, authProviderName string) (string, error) { return parseAccountIdFromArn(*outUser.User.Arn) } - // Then try IAM ListRoles awsErr, ok := err.(awserr.Error) // AccessDenied and ValidationError can be raised // if credentials belong to federated profile, so we ignore these if !ok || (awsErr.Code() != "AccessDenied" && awsErr.Code() != "ValidationError") { return "", fmt.Errorf("Failed getting account ID via 'iam:GetUser': %s", err) } - log.Printf("[DEBUG] Getting account ID via iam:GetUser failed: %s", err) - log.Println("[DEBUG] Trying to get account ID via iam:ListRoles instead") + + // Then try STS GetCallerIdentity + log.Println("[DEBUG] Trying to get account ID via sts:GetCallerIdentity") + outCallerIdentity, err := stsconn.GetCallerIdentity(&sts.GetCallerIdentityInput{}) + if err == nil { + return *outCallerIdentity.Account, nil + } + log.Printf("[DEBUG] Getting account ID via sts:GetCallerIdentity failed: %s", err) + + // Then try IAM ListRoles + log.Println("[DEBUG] Trying to get account ID via iam:ListRoles") outRoles, err := iamconn.ListRoles(&iam.ListRolesInput{ MaxItems: aws.Int64(int64(1)), }) diff --git a/builtin/providers/aws/auth_helpers_test.go b/builtin/providers/aws/auth_helpers_test.go index a5fcf8f16..a9de0fcc6 100644 --- a/builtin/providers/aws/auth_helpers_test.go +++ b/builtin/providers/aws/auth_helpers_test.go @@ -18,6 +18,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/iam" + "github.com/aws/aws-sdk-go/service/sts" ) func TestAWSGetAccountId_shouldBeValid_fromEC2Role(t *testing.T) { @@ -28,10 +29,10 @@ func TestAWSGetAccountId_shouldBeValid_fromEC2Role(t *testing.T) { defer awsTs() iamEndpoints := []*iamEndpoint{} - ts, iamConn := getMockedAwsIamApi(iamEndpoints) + ts, iamConn, stsConn := getMockedAwsIamStsApi(iamEndpoints) defer ts() - id, err := GetAccountId(iamConn, ec2rolecreds.ProviderName) + id, err := GetAccountId(iamConn, stsConn, ec2rolecreds.ProviderName) if err != nil { t.Fatalf("Getting account ID from EC2 metadata API failed: %s", err) } @@ -55,10 +56,10 @@ func TestAWSGetAccountId_shouldBeValid_EC2RoleHasPriority(t *testing.T) { Response: &iamResponse{200, iamResponse_GetUser_valid, "text/xml"}, }, } - ts, iamConn := getMockedAwsIamApi(iamEndpoints) + ts, iamConn, stsConn := getMockedAwsIamStsApi(iamEndpoints) defer ts() - id, err := GetAccountId(iamConn, ec2rolecreds.ProviderName) + id, err := GetAccountId(iamConn, stsConn, ec2rolecreds.ProviderName) if err != nil { t.Fatalf("Getting account ID from EC2 metadata API failed: %s", err) } @@ -76,10 +77,36 @@ func TestAWSGetAccountId_shouldBeValid_fromIamUser(t *testing.T) { Response: &iamResponse{200, iamResponse_GetUser_valid, "text/xml"}, }, } - ts, iamConn := getMockedAwsIamApi(iamEndpoints) + + ts, iamConn, stsConn := getMockedAwsIamStsApi(iamEndpoints) defer ts() - id, err := GetAccountId(iamConn, "") + id, err := GetAccountId(iamConn, stsConn, "") + if err != nil { + t.Fatalf("Getting account ID via GetUser failed: %s", err) + } + + expectedAccountId := "123456789012" + if id != expectedAccountId { + t.Fatalf("Expected account ID: %s, given: %s", expectedAccountId, id) + } +} + +func TestAWSGetAccountId_shouldBeValid_fromGetCallerIdentity(t *testing.T) { + iamEndpoints := []*iamEndpoint{ + &iamEndpoint{ + Request: &iamRequest{"POST", "/", "Action=GetUser&Version=2010-05-08"}, + Response: &iamResponse{403, iamResponse_GetUser_unauthorized, "text/xml"}, + }, + &iamEndpoint{ + Request: &iamRequest{"POST", "/", "Action=GetCallerIdentity&Version=2011-06-15"}, + Response: &iamResponse{200, stsResponse_GetCallerIdentity_valid, "text/xml"}, + }, + } + ts, iamConn, stsConn := getMockedAwsIamStsApi(iamEndpoints) + defer ts() + + id, err := GetAccountId(iamConn, stsConn, "") if err != nil { t.Fatalf("Getting account ID via GetUser failed: %s", err) } @@ -96,15 +123,19 @@ func TestAWSGetAccountId_shouldBeValid_fromIamListRoles(t *testing.T) { Request: &iamRequest{"POST", "/", "Action=GetUser&Version=2010-05-08"}, Response: &iamResponse{403, iamResponse_GetUser_unauthorized, "text/xml"}, }, + &iamEndpoint{ + Request: &iamRequest{"POST", "/", "Action=GetCallerIdentity&Version=2011-06-15"}, + Response: &iamResponse{403, stsResponse_GetCallerIdentity_unauthorized, "text/xml"}, + }, &iamEndpoint{ Request: &iamRequest{"POST", "/", "Action=ListRoles&MaxItems=1&Version=2010-05-08"}, Response: &iamResponse{200, iamResponse_ListRoles_valid, "text/xml"}, }, } - ts, iamConn := getMockedAwsIamApi(iamEndpoints) + ts, iamConn, stsConn := getMockedAwsIamStsApi(iamEndpoints) defer ts() - id, err := GetAccountId(iamConn, "") + id, err := GetAccountId(iamConn, stsConn, "") if err != nil { t.Fatalf("Getting account ID via ListRoles failed: %s", err) } @@ -126,10 +157,10 @@ func TestAWSGetAccountId_shouldBeValid_federatedRole(t *testing.T) { Response: &iamResponse{200, iamResponse_ListRoles_valid, "text/xml"}, }, } - ts, iamConn := getMockedAwsIamApi(iamEndpoints) + ts, iamConn, stsConn := getMockedAwsIamStsApi(iamEndpoints) defer ts() - id, err := GetAccountId(iamConn, "") + id, err := GetAccountId(iamConn, stsConn, "") if err != nil { t.Fatalf("Getting account ID via ListRoles failed: %s", err) } @@ -151,10 +182,10 @@ func TestAWSGetAccountId_shouldError_unauthorizedFromIam(t *testing.T) { Response: &iamResponse{403, iamResponse_ListRoles_unauthorized, "text/xml"}, }, } - ts, iamConn := getMockedAwsIamApi(iamEndpoints) + ts, iamConn, stsConn := getMockedAwsIamStsApi(iamEndpoints) defer ts() - id, err := GetAccountId(iamConn, "") + id, err := GetAccountId(iamConn, stsConn, "") if err == nil { t.Fatal("Expected error when getting account ID") } @@ -586,15 +617,15 @@ func invalidAwsEnv(t *testing.T) func() { return ts.Close } -// getMockedAwsIamApi establishes a httptest server to simulate behaviour -// of a real AWS' IAM server -func getMockedAwsIamApi(endpoints []*iamEndpoint) (func(), *iam.IAM) { +// getMockedAwsIamStsApi establishes a httptest server to simulate behaviour +// of a real AWS' IAM & STS server +func getMockedAwsIamStsApi(endpoints []*iamEndpoint) (func(), *iam.IAM, *sts.STS) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { buf := new(bytes.Buffer) buf.ReadFrom(r.Body) requestBody := buf.String() - log.Printf("[DEBUG] Received IAM API %q request to %q: %s", + log.Printf("[DEBUG] Received API %q request to %q: %s", r.Method, r.RequestURI, requestBody) for _, e := range endpoints { @@ -624,8 +655,8 @@ func getMockedAwsIamApi(endpoints []*iamEndpoint) (func(), *iam.IAM) { CredentialsChainVerboseErrors: aws.Bool(true), }) iamConn := iam.New(sess) - - return ts.Close, iamConn + stsConn := sts.New(sess) + return ts.Close, iamConn, stsConn } func getEnv() *currentEnv { @@ -718,6 +749,26 @@ const iamResponse_GetUser_unauthorized = ` + + arn:aws:iam::123456789012:user/Alice + AKIAI44QH8DHBEXAMPLE + 123456789012 + + + 01234567-89ab-cdef-0123-456789abcdef + +` + +const stsResponse_GetCallerIdentity_unauthorized = ` + + Sender + AccessDenied + User: arn:aws:iam::123456789012:user/Bob is not authorized to perform: sts:GetCallerIdentity + + 01234567-89ab-cdef-0123-456789abcdef +` + const iamResponse_GetUser_federatedFailure = ` Sender diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index 82a82e016..0db0ec0f9 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -50,6 +50,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/sns" "github.com/aws/aws-sdk-go/service/sqs" + "github.com/aws/aws-sdk-go/service/sts" ) type Config struct { @@ -92,8 +93,10 @@ type AWSClient struct { s3conn *s3.S3 sqsconn *sqs.SQS snsconn *sns.SNS + stsconn *sts.STS redshiftconn *redshift.Redshift r53conn *route53.Route53 + accountid string region string rdsconn *rds.RDS iamconn *iam.IAM @@ -172,6 +175,9 @@ func (c *Config) Client() (interface{}, error) { awsIamSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.IamEndpoint)}) client.iamconn = iam.New(awsIamSess) + log.Println("[INFO] Initializing STS connection") + client.stsconn = sts.New(sess) + err = c.ValidateCredentials(client.iamconn) if err != nil { errs = append(errs, err) @@ -185,6 +191,11 @@ func (c *Config) Client() (interface{}, error) { // http://docs.aws.amazon.com/general/latest/gr/sigv4_changes.html usEast1Sess := sess.Copy(&aws.Config{Region: aws.String("us-east-1")}) + accountId, err := GetAccountId(client.iamconn, client.stsconn, cp.ProviderName) + if err == nil { + client.accountid = accountId + } + log.Println("[INFO] Initializing DynamoDB connection") dynamoSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DynamoDBEndpoint)}) client.dynamodbconn = dynamodb.New(dynamoSess) @@ -215,7 +226,7 @@ func (c *Config) Client() (interface{}, error) { log.Println("[INFO] Initializing Elastic Beanstalk Connection") client.elasticbeanstalkconn = elasticbeanstalk.New(sess) - authErr := c.ValidateAccountId(client.iamconn, cp.ProviderName) + authErr := c.ValidateAccountId(client.accountid) if authErr != nil { errs = append(errs, authErr) } @@ -338,20 +349,16 @@ func (c *Config) ValidateCredentials(iamconn *iam.IAM) error { // ValidateAccountId returns a context-specific error if the configured account // id is explicitly forbidden or not authorised; and nil if it is authorised. -func (c *Config) ValidateAccountId(iamconn *iam.IAM, authProviderName string) error { +func (c *Config) ValidateAccountId(accountId string) error { if c.AllowedAccountIds == nil && c.ForbiddenAccountIds == nil { return nil } log.Printf("[INFO] Validating account ID") - account_id, err := GetAccountId(iamconn, authProviderName) - if err != nil { - return err - } if c.ForbiddenAccountIds != nil { for _, id := range c.ForbiddenAccountIds { - if id == account_id { + if id == accountId { return fmt.Errorf("Forbidden account ID (%s)", id) } } @@ -359,11 +366,11 @@ func (c *Config) ValidateAccountId(iamconn *iam.IAM, authProviderName string) er if c.AllowedAccountIds != nil { for _, id := range c.AllowedAccountIds { - if id == account_id { + if id == accountId { return nil } } - return fmt.Errorf("Account ID not allowed (%s)", account_id) + return fmt.Errorf("Account ID not allowed (%s)", accountId) } return nil