From 8ee936a068eb71c0375859192ed3d5c1ca4965e7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 24 Feb 2018 19:52:10 -0800 Subject: [PATCH] Deps: Bump terraform-provider-aws@v1.10.0 and aws-sdk-go@v1.12.75 --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 17 + .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/appsync/api.go | 5574 +++++++++++++++++ .../aws/aws-sdk-go/service/appsync/doc.go | 29 + .../aws/aws-sdk-go/service/appsync/errors.go | 69 + .../aws/aws-sdk-go/service/appsync/service.go | 97 + .../service/cognitoidentityprovider/api.go | 208 +- .../aws/aws-sdk-go/service/dax/api.go | 4621 ++++++++++++++ .../aws/aws-sdk-go/service/dax/doc.go | 33 + .../aws/aws-sdk-go/service/dax/errors.go | 160 + .../aws/aws-sdk-go/service/dax/service.go | 95 + .../aws/aws-sdk-go/service/ec2/api.go | 587 +- .../aws/aws-sdk-go/service/ec2/doc.go | 2 +- .../aws/aws-sdk-go/service/guardduty/api.go | 75 + .../aws/aws-sdk-go/service/kms/api.go | 3 + .../aws/aws-sdk-go/service/rds/api.go | 103 +- .../terraform-provider-aws/CHANGELOG.md | 80 + .../terraform-provider-aws/aws/config.go | 8 +- .../data_source_aws_elb_service_account.go | 2 +- ...ata_source_aws_inspector_rules_packages.go | 56 + .../aws/data_source_aws_kms_alias.go | 36 +- .../terraform-provider-aws/aws/provider.go | 11 + ...resource_aws_acm_certificate_validation.go | 63 +- .../aws/resource_aws_api_gateway_vpc_link.go | 205 + .../aws/resource_aws_appsync_graphql_api.go | 195 + .../aws/resource_aws_autoscaling_policy.go | 218 +- .../aws/resource_aws_cloudtrail.go | 169 +- .../aws/resource_aws_codebuild_project.go | 83 +- ...esource_aws_codedeploy_deployment_group.go | 2 + .../resource_aws_cognito_user_pool_client.go | 1 + .../aws/resource_aws_dax_cluster.go | 588 ++ ...esource_aws_directory_service_directory.go | 200 +- .../aws/resource_aws_dx_connection.go | 110 +- .../aws/resource_aws_dx_lag.go | 169 +- .../aws/resource_aws_dynamodb_table.go | 33 +- .../aws/resource_aws_ecs_service.go | 16 +- .../aws/resource_aws_elasticsearch_domain.go | 3 + .../aws/resource_aws_emr_cluster.go | 122 +- .../aws/resource_aws_gamelift_alias.go | 181 + .../aws/resource_aws_gamelift_fleet.go | 604 ++ .../aws/resource_aws_iam_user_ssh_key.go | 8 +- .../aws/resource_aws_instance.go | 23 +- .../aws/resource_aws_iot_thing_type.go | 202 + ...ce_aws_kinesis_firehose_delivery_stream.go | 41 +- .../aws/resource_aws_lambda_function.go | 24 +- .../resource_aws_lb_listener_certificate.go | 157 + .../aws/resource_aws_lb_listener_rule.go | 83 +- .../aws/resource_aws_lb_target_group.go | 68 +- .../aws/resource_aws_rds_cluster.go | 16 + .../aws/resource_aws_rds_cluster_instance.go | 6 + .../aws/resource_aws_redshift_cluster.go | 71 +- .../aws/resource_aws_route53_record.go | 19 +- .../aws/resource_aws_s3_bucket.go | 128 +- .../aws/resource_aws_s3_bucket_metric.go | 218 + .../resource_aws_service_discovery_service.go | 39 +- ...e_aws_service_discovery_service_migrate.go | 36 + .../aws/resource_aws_ses_domain_mail_from.go | 110 + .../aws/resource_aws_sns_topic.go | 134 +- .../aws/resource_aws_spot_fleet_request.go | 7 +- .../aws/resource_aws_spot_instance_request.go | 2 +- .../aws/resource_aws_sqs_queue.go | 19 +- .../aws/resource_aws_ssm_association.go | 5 +- .../aws/resource_aws_volume_attachment.go | 2 +- .../aws/resource_aws_vpc_endpoint.go | 2 +- .../resource_aws_vpc_peering_connection.go | 34 +- .../terraform-provider-aws/aws/structure.go | 38 + .../terraform-provider-aws/aws/tagsDAX.go | 115 + .../terraform-provider-aws/aws/tagsDX.go | 137 + .../terraform-provider-aws/aws/validators.go | 95 +- vendor/vendor.json | 804 +-- 70 files changed, 16455 insertions(+), 1018 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appsync/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/dax/service.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service_migrate.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 9e728feeee05..3cdfabe656b4 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -106,6 +106,7 @@ const ( IotServiceID = "iot" // Iot. KinesisServiceID = "kinesis" // Kinesis. KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics. + KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo. KmsServiceID = "kms" // Kms. LambdaServiceID = "lambda" // Lambda. LightsailServiceID = "lightsail" // Lightsail. @@ -1234,6 +1235,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "kinesisvideo": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "kms": service{ Endpoints: endpoints{ @@ -2462,6 +2473,12 @@ var awsusgovPartition = partition{ }, }, }, + "ecr": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "ecs": service{ Endpoints: endpoints{ 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 12e3c77889ad..dd036c971e10 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.12.73" +const SDKVersion = "1.12.75" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go new file mode 100644 index 000000000000..ce553365c918 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go @@ -0,0 +1,5574 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package appsync + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCreateApiKey = "CreateApiKey" + +// CreateApiKeyRequest generates a "aws/request.Request" representing the +// client's request for the CreateApiKey operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateApiKey for more information on using the CreateApiKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateApiKeyRequest method. +// req, resp := client.CreateApiKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey +func (c *AppSync) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Request, output *CreateApiKeyOutput) { + op := &request.Operation{ + Name: opCreateApiKey, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/apikeys", + } + + if input == nil { + input = &CreateApiKeyInput{} + } + + output = &CreateApiKeyOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApiKey API operation for AWS AppSync. +// +// Creates a unique key that you can distribute to clients who are executing +// your API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation CreateApiKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded a limit. Try your request again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded a limit. Try your request again. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// * ErrCodeApiKeyLimitExceededException "ApiKeyLimitExceededException" +// The API key exceeded a limit. Try your request again. +// +// * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" +// The API key expiration must be set to a value between 1 and 365 days. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey +func (c *AppSync) CreateApiKey(input *CreateApiKeyInput) (*CreateApiKeyOutput, error) { + req, out := c.CreateApiKeyRequest(input) + return out, req.Send() +} + +// CreateApiKeyWithContext is the same as CreateApiKey with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApiKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) CreateApiKeyWithContext(ctx aws.Context, input *CreateApiKeyInput, opts ...request.Option) (*CreateApiKeyOutput, error) { + req, out := c.CreateApiKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDataSource = "CreateDataSource" + +// CreateDataSourceRequest generates a "aws/request.Request" representing the +// client's request for the CreateDataSource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDataSource for more information on using the CreateDataSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDataSourceRequest method. +// req, resp := client.CreateDataSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateDataSource +func (c *AppSync) CreateDataSourceRequest(input *CreateDataSourceInput) (req *request.Request, output *CreateDataSourceOutput) { + op := &request.Operation{ + Name: opCreateDataSource, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/datasources", + } + + if input == nil { + input = &CreateDataSourceInput{} + } + + output = &CreateDataSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDataSource API operation for AWS AppSync. +// +// Creates a DataSource object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation CreateDataSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateDataSource +func (c *AppSync) CreateDataSource(input *CreateDataSourceInput) (*CreateDataSourceOutput, error) { + req, out := c.CreateDataSourceRequest(input) + return out, req.Send() +} + +// CreateDataSourceWithContext is the same as CreateDataSource with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDataSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) CreateDataSourceWithContext(ctx aws.Context, input *CreateDataSourceInput, opts ...request.Option) (*CreateDataSourceOutput, error) { + req, out := c.CreateDataSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateGraphqlApi = "CreateGraphqlApi" + +// CreateGraphqlApiRequest generates a "aws/request.Request" representing the +// client's request for the CreateGraphqlApi operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGraphqlApi for more information on using the CreateGraphqlApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGraphqlApiRequest method. +// req, resp := client.CreateGraphqlApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateGraphqlApi +func (c *AppSync) CreateGraphqlApiRequest(input *CreateGraphqlApiInput) (req *request.Request, output *CreateGraphqlApiOutput) { + op := &request.Operation{ + Name: opCreateGraphqlApi, + HTTPMethod: "POST", + HTTPPath: "/v1/apis", + } + + if input == nil { + input = &CreateGraphqlApiInput{} + } + + output = &CreateGraphqlApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGraphqlApi API operation for AWS AppSync. +// +// Creates a GraphqlApi object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation CreateGraphqlApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded a limit. Try your request again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded a limit. Try your request again. +// +// * ErrCodeApiLimitExceededException "ApiLimitExceededException" +// The GraphQL API exceeded a limit. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateGraphqlApi +func (c *AppSync) CreateGraphqlApi(input *CreateGraphqlApiInput) (*CreateGraphqlApiOutput, error) { + req, out := c.CreateGraphqlApiRequest(input) + return out, req.Send() +} + +// CreateGraphqlApiWithContext is the same as CreateGraphqlApi with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGraphqlApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) CreateGraphqlApiWithContext(ctx aws.Context, input *CreateGraphqlApiInput, opts ...request.Option) (*CreateGraphqlApiOutput, error) { + req, out := c.CreateGraphqlApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateResolver = "CreateResolver" + +// CreateResolverRequest generates a "aws/request.Request" representing the +// client's request for the CreateResolver operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResolver for more information on using the CreateResolver +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResolverRequest method. +// req, resp := client.CreateResolverRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolver +func (c *AppSync) CreateResolverRequest(input *CreateResolverInput) (req *request.Request, output *CreateResolverOutput) { + op := &request.Operation{ + Name: opCreateResolver, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers", + } + + if input == nil { + input = &CreateResolverInput{} + } + + output = &CreateResolverOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResolver API operation for AWS AppSync. +// +// Creates a Resolver object. +// +// A resolver converts incoming requests into a format that a data source can +// understand and converts the data source's responses into GraphQL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation CreateResolver for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolver +func (c *AppSync) CreateResolver(input *CreateResolverInput) (*CreateResolverOutput, error) { + req, out := c.CreateResolverRequest(input) + return out, req.Send() +} + +// CreateResolverWithContext is the same as CreateResolver with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResolver for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) CreateResolverWithContext(ctx aws.Context, input *CreateResolverInput, opts ...request.Option) (*CreateResolverOutput, error) { + req, out := c.CreateResolverRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateType = "CreateType" + +// CreateTypeRequest generates a "aws/request.Request" representing the +// client's request for the CreateType operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateType for more information on using the CreateType +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTypeRequest method. +// req, resp := client.CreateTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateType +func (c *AppSync) CreateTypeRequest(input *CreateTypeInput) (req *request.Request, output *CreateTypeOutput) { + op := &request.Operation{ + Name: opCreateType, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/types", + } + + if input == nil { + input = &CreateTypeInput{} + } + + output = &CreateTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateType API operation for AWS AppSync. +// +// Creates a Type object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation CreateType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateType +func (c *AppSync) CreateType(input *CreateTypeInput) (*CreateTypeOutput, error) { + req, out := c.CreateTypeRequest(input) + return out, req.Send() +} + +// CreateTypeWithContext is the same as CreateType with the addition of +// the ability to pass a context and additional request options. +// +// See CreateType for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) CreateTypeWithContext(ctx aws.Context, input *CreateTypeInput, opts ...request.Option) (*CreateTypeOutput, error) { + req, out := c.CreateTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApiKey = "DeleteApiKey" + +// DeleteApiKeyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApiKey operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApiKey for more information on using the DeleteApiKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApiKeyRequest method. +// req, resp := client.DeleteApiKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteApiKey +func (c *AppSync) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Request, output *DeleteApiKeyOutput) { + op := &request.Operation{ + Name: opDeleteApiKey, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apis/{apiId}/apikeys/{id}", + } + + if input == nil { + input = &DeleteApiKeyInput{} + } + + output = &DeleteApiKeyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApiKey API operation for AWS AppSync. +// +// Deletes an API key. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation DeleteApiKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteApiKey +func (c *AppSync) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput, error) { + req, out := c.DeleteApiKeyRequest(input) + return out, req.Send() +} + +// DeleteApiKeyWithContext is the same as DeleteApiKey with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApiKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) DeleteApiKeyWithContext(ctx aws.Context, input *DeleteApiKeyInput, opts ...request.Option) (*DeleteApiKeyOutput, error) { + req, out := c.DeleteApiKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDataSource = "DeleteDataSource" + +// DeleteDataSourceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDataSource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDataSource for more information on using the DeleteDataSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDataSourceRequest method. +// req, resp := client.DeleteDataSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteDataSource +func (c *AppSync) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *request.Request, output *DeleteDataSourceOutput) { + op := &request.Operation{ + Name: opDeleteDataSource, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apis/{apiId}/datasources/{name}", + } + + if input == nil { + input = &DeleteDataSourceInput{} + } + + output = &DeleteDataSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDataSource API operation for AWS AppSync. +// +// Deletes a DataSource object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation DeleteDataSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteDataSource +func (c *AppSync) DeleteDataSource(input *DeleteDataSourceInput) (*DeleteDataSourceOutput, error) { + req, out := c.DeleteDataSourceRequest(input) + return out, req.Send() +} + +// DeleteDataSourceWithContext is the same as DeleteDataSource with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDataSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) DeleteDataSourceWithContext(ctx aws.Context, input *DeleteDataSourceInput, opts ...request.Option) (*DeleteDataSourceOutput, error) { + req, out := c.DeleteDataSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGraphqlApi = "DeleteGraphqlApi" + +// DeleteGraphqlApiRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGraphqlApi operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGraphqlApi for more information on using the DeleteGraphqlApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGraphqlApiRequest method. +// req, resp := client.DeleteGraphqlApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteGraphqlApi +func (c *AppSync) DeleteGraphqlApiRequest(input *DeleteGraphqlApiInput) (req *request.Request, output *DeleteGraphqlApiOutput) { + op := &request.Operation{ + Name: opDeleteGraphqlApi, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apis/{apiId}", + } + + if input == nil { + input = &DeleteGraphqlApiInput{} + } + + output = &DeleteGraphqlApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGraphqlApi API operation for AWS AppSync. +// +// Deletes a GraphqlApi object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation DeleteGraphqlApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteGraphqlApi +func (c *AppSync) DeleteGraphqlApi(input *DeleteGraphqlApiInput) (*DeleteGraphqlApiOutput, error) { + req, out := c.DeleteGraphqlApiRequest(input) + return out, req.Send() +} + +// DeleteGraphqlApiWithContext is the same as DeleteGraphqlApi with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGraphqlApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) DeleteGraphqlApiWithContext(ctx aws.Context, input *DeleteGraphqlApiInput, opts ...request.Option) (*DeleteGraphqlApiOutput, error) { + req, out := c.DeleteGraphqlApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteResolver = "DeleteResolver" + +// DeleteResolverRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResolver operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResolver for more information on using the DeleteResolver +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResolverRequest method. +// req, resp := client.DeleteResolverRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteResolver +func (c *AppSync) DeleteResolverRequest(input *DeleteResolverInput) (req *request.Request, output *DeleteResolverOutput) { + op := &request.Operation{ + Name: opDeleteResolver, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}", + } + + if input == nil { + input = &DeleteResolverInput{} + } + + output = &DeleteResolverOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResolver API operation for AWS AppSync. +// +// Deletes a Resolver object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation DeleteResolver for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteResolver +func (c *AppSync) DeleteResolver(input *DeleteResolverInput) (*DeleteResolverOutput, error) { + req, out := c.DeleteResolverRequest(input) + return out, req.Send() +} + +// DeleteResolverWithContext is the same as DeleteResolver with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResolver for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) DeleteResolverWithContext(ctx aws.Context, input *DeleteResolverInput, opts ...request.Option) (*DeleteResolverOutput, error) { + req, out := c.DeleteResolverRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteType = "DeleteType" + +// DeleteTypeRequest generates a "aws/request.Request" representing the +// client's request for the DeleteType operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteType for more information on using the DeleteType +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTypeRequest method. +// req, resp := client.DeleteTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteType +func (c *AppSync) DeleteTypeRequest(input *DeleteTypeInput) (req *request.Request, output *DeleteTypeOutput) { + op := &request.Operation{ + Name: opDeleteType, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}", + } + + if input == nil { + input = &DeleteTypeInput{} + } + + output = &DeleteTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteType API operation for AWS AppSync. +// +// Deletes a Type object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation DeleteType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteType +func (c *AppSync) DeleteType(input *DeleteTypeInput) (*DeleteTypeOutput, error) { + req, out := c.DeleteTypeRequest(input) + return out, req.Send() +} + +// DeleteTypeWithContext is the same as DeleteType with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteType for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) DeleteTypeWithContext(ctx aws.Context, input *DeleteTypeInput, opts ...request.Option) (*DeleteTypeOutput, error) { + req, out := c.DeleteTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDataSource = "GetDataSource" + +// GetDataSourceRequest generates a "aws/request.Request" representing the +// client's request for the GetDataSource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDataSource for more information on using the GetDataSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDataSourceRequest method. +// req, resp := client.GetDataSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetDataSource +func (c *AppSync) GetDataSourceRequest(input *GetDataSourceInput) (req *request.Request, output *GetDataSourceOutput) { + op := &request.Operation{ + Name: opGetDataSource, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/datasources/{name}", + } + + if input == nil { + input = &GetDataSourceInput{} + } + + output = &GetDataSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDataSource API operation for AWS AppSync. +// +// Retrieves a DataSource object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation GetDataSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetDataSource +func (c *AppSync) GetDataSource(input *GetDataSourceInput) (*GetDataSourceOutput, error) { + req, out := c.GetDataSourceRequest(input) + return out, req.Send() +} + +// GetDataSourceWithContext is the same as GetDataSource with the addition of +// the ability to pass a context and additional request options. +// +// See GetDataSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) GetDataSourceWithContext(ctx aws.Context, input *GetDataSourceInput, opts ...request.Option) (*GetDataSourceOutput, error) { + req, out := c.GetDataSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGraphqlApi = "GetGraphqlApi" + +// GetGraphqlApiRequest generates a "aws/request.Request" representing the +// client's request for the GetGraphqlApi operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGraphqlApi for more information on using the GetGraphqlApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGraphqlApiRequest method. +// req, resp := client.GetGraphqlApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetGraphqlApi +func (c *AppSync) GetGraphqlApiRequest(input *GetGraphqlApiInput) (req *request.Request, output *GetGraphqlApiOutput) { + op := &request.Operation{ + Name: opGetGraphqlApi, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}", + } + + if input == nil { + input = &GetGraphqlApiInput{} + } + + output = &GetGraphqlApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGraphqlApi API operation for AWS AppSync. +// +// Retrieves a GraphqlApi object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation GetGraphqlApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetGraphqlApi +func (c *AppSync) GetGraphqlApi(input *GetGraphqlApiInput) (*GetGraphqlApiOutput, error) { + req, out := c.GetGraphqlApiRequest(input) + return out, req.Send() +} + +// GetGraphqlApiWithContext is the same as GetGraphqlApi with the addition of +// the ability to pass a context and additional request options. +// +// See GetGraphqlApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) GetGraphqlApiWithContext(ctx aws.Context, input *GetGraphqlApiInput, opts ...request.Option) (*GetGraphqlApiOutput, error) { + req, out := c.GetGraphqlApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetIntrospectionSchema = "GetIntrospectionSchema" + +// GetIntrospectionSchemaRequest generates a "aws/request.Request" representing the +// client's request for the GetIntrospectionSchema operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetIntrospectionSchema for more information on using the GetIntrospectionSchema +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetIntrospectionSchemaRequest method. +// req, resp := client.GetIntrospectionSchemaRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetIntrospectionSchema +func (c *AppSync) GetIntrospectionSchemaRequest(input *GetIntrospectionSchemaInput) (req *request.Request, output *GetIntrospectionSchemaOutput) { + op := &request.Operation{ + Name: opGetIntrospectionSchema, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/schema", + } + + if input == nil { + input = &GetIntrospectionSchemaInput{} + } + + output = &GetIntrospectionSchemaOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetIntrospectionSchema API operation for AWS AppSync. +// +// Retrieves the introspection schema for a GraphQL API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation GetIntrospectionSchema for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGraphQLSchemaException "GraphQLSchemaException" +// The GraphQL schema is not valid. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetIntrospectionSchema +func (c *AppSync) GetIntrospectionSchema(input *GetIntrospectionSchemaInput) (*GetIntrospectionSchemaOutput, error) { + req, out := c.GetIntrospectionSchemaRequest(input) + return out, req.Send() +} + +// GetIntrospectionSchemaWithContext is the same as GetIntrospectionSchema with the addition of +// the ability to pass a context and additional request options. +// +// See GetIntrospectionSchema for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) GetIntrospectionSchemaWithContext(ctx aws.Context, input *GetIntrospectionSchemaInput, opts ...request.Option) (*GetIntrospectionSchemaOutput, error) { + req, out := c.GetIntrospectionSchemaRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResolver = "GetResolver" + +// GetResolverRequest generates a "aws/request.Request" representing the +// client's request for the GetResolver operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResolver for more information on using the GetResolver +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResolverRequest method. +// req, resp := client.GetResolverRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetResolver +func (c *AppSync) GetResolverRequest(input *GetResolverInput) (req *request.Request, output *GetResolverOutput) { + op := &request.Operation{ + Name: opGetResolver, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}", + } + + if input == nil { + input = &GetResolverInput{} + } + + output = &GetResolverOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResolver API operation for AWS AppSync. +// +// Retrieves a Resolver object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation GetResolver for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetResolver +func (c *AppSync) GetResolver(input *GetResolverInput) (*GetResolverOutput, error) { + req, out := c.GetResolverRequest(input) + return out, req.Send() +} + +// GetResolverWithContext is the same as GetResolver with the addition of +// the ability to pass a context and additional request options. +// +// See GetResolver for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) GetResolverWithContext(ctx aws.Context, input *GetResolverInput, opts ...request.Option) (*GetResolverOutput, error) { + req, out := c.GetResolverRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSchemaCreationStatus = "GetSchemaCreationStatus" + +// GetSchemaCreationStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetSchemaCreationStatus operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSchemaCreationStatus for more information on using the GetSchemaCreationStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSchemaCreationStatusRequest method. +// req, resp := client.GetSchemaCreationStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetSchemaCreationStatus +func (c *AppSync) GetSchemaCreationStatusRequest(input *GetSchemaCreationStatusInput) (req *request.Request, output *GetSchemaCreationStatusOutput) { + op := &request.Operation{ + Name: opGetSchemaCreationStatus, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/schemacreation", + } + + if input == nil { + input = &GetSchemaCreationStatusInput{} + } + + output = &GetSchemaCreationStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSchemaCreationStatus API operation for AWS AppSync. +// +// Retrieves the current status of a schema creation operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation GetSchemaCreationStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetSchemaCreationStatus +func (c *AppSync) GetSchemaCreationStatus(input *GetSchemaCreationStatusInput) (*GetSchemaCreationStatusOutput, error) { + req, out := c.GetSchemaCreationStatusRequest(input) + return out, req.Send() +} + +// GetSchemaCreationStatusWithContext is the same as GetSchemaCreationStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetSchemaCreationStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) GetSchemaCreationStatusWithContext(ctx aws.Context, input *GetSchemaCreationStatusInput, opts ...request.Option) (*GetSchemaCreationStatusOutput, error) { + req, out := c.GetSchemaCreationStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetType = "GetType" + +// GetTypeRequest generates a "aws/request.Request" representing the +// client's request for the GetType operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetType for more information on using the GetType +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetTypeRequest method. +// req, resp := client.GetTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetType +func (c *AppSync) GetTypeRequest(input *GetTypeInput) (req *request.Request, output *GetTypeOutput) { + op := &request.Operation{ + Name: opGetType, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}", + } + + if input == nil { + input = &GetTypeInput{} + } + + output = &GetTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetType API operation for AWS AppSync. +// +// Retrieves a Type object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation GetType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetType +func (c *AppSync) GetType(input *GetTypeInput) (*GetTypeOutput, error) { + req, out := c.GetTypeRequest(input) + return out, req.Send() +} + +// GetTypeWithContext is the same as GetType with the addition of +// the ability to pass a context and additional request options. +// +// See GetType for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) GetTypeWithContext(ctx aws.Context, input *GetTypeInput, opts ...request.Option) (*GetTypeOutput, error) { + req, out := c.GetTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListApiKeys = "ListApiKeys" + +// ListApiKeysRequest generates a "aws/request.Request" representing the +// client's request for the ListApiKeys operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListApiKeys for more information on using the ListApiKeys +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListApiKeysRequest method. +// req, resp := client.ListApiKeysRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListApiKeys +func (c *AppSync) ListApiKeysRequest(input *ListApiKeysInput) (req *request.Request, output *ListApiKeysOutput) { + op := &request.Operation{ + Name: opListApiKeys, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/apikeys", + } + + if input == nil { + input = &ListApiKeysInput{} + } + + output = &ListApiKeysOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListApiKeys API operation for AWS AppSync. +// +// Lists the API keys for a given API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation ListApiKeys for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListApiKeys +func (c *AppSync) ListApiKeys(input *ListApiKeysInput) (*ListApiKeysOutput, error) { + req, out := c.ListApiKeysRequest(input) + return out, req.Send() +} + +// ListApiKeysWithContext is the same as ListApiKeys with the addition of +// the ability to pass a context and additional request options. +// +// See ListApiKeys for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) ListApiKeysWithContext(ctx aws.Context, input *ListApiKeysInput, opts ...request.Option) (*ListApiKeysOutput, error) { + req, out := c.ListApiKeysRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDataSources = "ListDataSources" + +// ListDataSourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListDataSources operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDataSources for more information on using the ListDataSources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDataSourcesRequest method. +// req, resp := client.ListDataSourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListDataSources +func (c *AppSync) ListDataSourcesRequest(input *ListDataSourcesInput) (req *request.Request, output *ListDataSourcesOutput) { + op := &request.Operation{ + Name: opListDataSources, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/datasources", + } + + if input == nil { + input = &ListDataSourcesInput{} + } + + output = &ListDataSourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDataSources API operation for AWS AppSync. +// +// Lists the data sources for a given API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation ListDataSources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListDataSources +func (c *AppSync) ListDataSources(input *ListDataSourcesInput) (*ListDataSourcesOutput, error) { + req, out := c.ListDataSourcesRequest(input) + return out, req.Send() +} + +// ListDataSourcesWithContext is the same as ListDataSources with the addition of +// the ability to pass a context and additional request options. +// +// See ListDataSources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) ListDataSourcesWithContext(ctx aws.Context, input *ListDataSourcesInput, opts ...request.Option) (*ListDataSourcesOutput, error) { + req, out := c.ListDataSourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGraphqlApis = "ListGraphqlApis" + +// ListGraphqlApisRequest generates a "aws/request.Request" representing the +// client's request for the ListGraphqlApis operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGraphqlApis for more information on using the ListGraphqlApis +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGraphqlApisRequest method. +// req, resp := client.ListGraphqlApisRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListGraphqlApis +func (c *AppSync) ListGraphqlApisRequest(input *ListGraphqlApisInput) (req *request.Request, output *ListGraphqlApisOutput) { + op := &request.Operation{ + Name: opListGraphqlApis, + HTTPMethod: "GET", + HTTPPath: "/v1/apis", + } + + if input == nil { + input = &ListGraphqlApisInput{} + } + + output = &ListGraphqlApisOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGraphqlApis API operation for AWS AppSync. +// +// Lists your GraphQL APIs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation ListGraphqlApis for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListGraphqlApis +func (c *AppSync) ListGraphqlApis(input *ListGraphqlApisInput) (*ListGraphqlApisOutput, error) { + req, out := c.ListGraphqlApisRequest(input) + return out, req.Send() +} + +// ListGraphqlApisWithContext is the same as ListGraphqlApis with the addition of +// the ability to pass a context and additional request options. +// +// See ListGraphqlApis for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) ListGraphqlApisWithContext(ctx aws.Context, input *ListGraphqlApisInput, opts ...request.Option) (*ListGraphqlApisOutput, error) { + req, out := c.ListGraphqlApisRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListResolvers = "ListResolvers" + +// ListResolversRequest generates a "aws/request.Request" representing the +// client's request for the ListResolvers operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResolvers for more information on using the ListResolvers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResolversRequest method. +// req, resp := client.ListResolversRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolvers +func (c *AppSync) ListResolversRequest(input *ListResolversInput) (req *request.Request, output *ListResolversOutput) { + op := &request.Operation{ + Name: opListResolvers, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers", + } + + if input == nil { + input = &ListResolversInput{} + } + + output = &ListResolversOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResolvers API operation for AWS AppSync. +// +// Lists the resolvers for a given API and type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation ListResolvers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolvers +func (c *AppSync) ListResolvers(input *ListResolversInput) (*ListResolversOutput, error) { + req, out := c.ListResolversRequest(input) + return out, req.Send() +} + +// ListResolversWithContext is the same as ListResolvers with the addition of +// the ability to pass a context and additional request options. +// +// See ListResolvers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) ListResolversWithContext(ctx aws.Context, input *ListResolversInput, opts ...request.Option) (*ListResolversOutput, error) { + req, out := c.ListResolversRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTypes = "ListTypes" + +// ListTypesRequest generates a "aws/request.Request" representing the +// client's request for the ListTypes operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTypes for more information on using the ListTypes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTypesRequest method. +// req, resp := client.ListTypesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListTypes +func (c *AppSync) ListTypesRequest(input *ListTypesInput) (req *request.Request, output *ListTypesOutput) { + op := &request.Operation{ + Name: opListTypes, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/types", + } + + if input == nil { + input = &ListTypesInput{} + } + + output = &ListTypesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTypes API operation for AWS AppSync. +// +// Lists the types for a given API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation ListTypes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListTypes +func (c *AppSync) ListTypes(input *ListTypesInput) (*ListTypesOutput, error) { + req, out := c.ListTypesRequest(input) + return out, req.Send() +} + +// ListTypesWithContext is the same as ListTypes with the addition of +// the ability to pass a context and additional request options. +// +// See ListTypes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) ListTypesWithContext(ctx aws.Context, input *ListTypesInput, opts ...request.Option) (*ListTypesOutput, error) { + req, out := c.ListTypesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartSchemaCreation = "StartSchemaCreation" + +// StartSchemaCreationRequest generates a "aws/request.Request" representing the +// client's request for the StartSchemaCreation operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartSchemaCreation for more information on using the StartSchemaCreation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartSchemaCreationRequest method. +// req, resp := client.StartSchemaCreationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/StartSchemaCreation +func (c *AppSync) StartSchemaCreationRequest(input *StartSchemaCreationInput) (req *request.Request, output *StartSchemaCreationOutput) { + op := &request.Operation{ + Name: opStartSchemaCreation, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/schemacreation", + } + + if input == nil { + input = &StartSchemaCreationInput{} + } + + output = &StartSchemaCreationOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartSchemaCreation API operation for AWS AppSync. +// +// Adds a new schema to your GraphQL API. +// +// This operation is asynchronous. Use to determine when it has completed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation StartSchemaCreation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/StartSchemaCreation +func (c *AppSync) StartSchemaCreation(input *StartSchemaCreationInput) (*StartSchemaCreationOutput, error) { + req, out := c.StartSchemaCreationRequest(input) + return out, req.Send() +} + +// StartSchemaCreationWithContext is the same as StartSchemaCreation with the addition of +// the ability to pass a context and additional request options. +// +// See StartSchemaCreation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) StartSchemaCreationWithContext(ctx aws.Context, input *StartSchemaCreationInput, opts ...request.Option) (*StartSchemaCreationOutput, error) { + req, out := c.StartSchemaCreationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApiKey = "UpdateApiKey" + +// UpdateApiKeyRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApiKey operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApiKey for more information on using the UpdateApiKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApiKeyRequest method. +// req, resp := client.UpdateApiKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey +func (c *AppSync) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Request, output *UpdateApiKeyOutput) { + op := &request.Operation{ + Name: opUpdateApiKey, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/apikeys/{id}", + } + + if input == nil { + input = &UpdateApiKeyInput{} + } + + output = &UpdateApiKeyOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApiKey API operation for AWS AppSync. +// +// Updates an API key. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation UpdateApiKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request exceeded a limit. Try your request again. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" +// The API key expiration must be set to a value between 1 and 365 days. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey +func (c *AppSync) UpdateApiKey(input *UpdateApiKeyInput) (*UpdateApiKeyOutput, error) { + req, out := c.UpdateApiKeyRequest(input) + return out, req.Send() +} + +// UpdateApiKeyWithContext is the same as UpdateApiKey with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApiKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) UpdateApiKeyWithContext(ctx aws.Context, input *UpdateApiKeyInput, opts ...request.Option) (*UpdateApiKeyOutput, error) { + req, out := c.UpdateApiKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDataSource = "UpdateDataSource" + +// UpdateDataSourceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDataSource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDataSource for more information on using the UpdateDataSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDataSourceRequest method. +// req, resp := client.UpdateDataSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateDataSource +func (c *AppSync) UpdateDataSourceRequest(input *UpdateDataSourceInput) (req *request.Request, output *UpdateDataSourceOutput) { + op := &request.Operation{ + Name: opUpdateDataSource, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/datasources/{name}", + } + + if input == nil { + input = &UpdateDataSourceInput{} + } + + output = &UpdateDataSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDataSource API operation for AWS AppSync. +// +// Updates a DataSource object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation UpdateDataSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateDataSource +func (c *AppSync) UpdateDataSource(input *UpdateDataSourceInput) (*UpdateDataSourceOutput, error) { + req, out := c.UpdateDataSourceRequest(input) + return out, req.Send() +} + +// UpdateDataSourceWithContext is the same as UpdateDataSource with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDataSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) UpdateDataSourceWithContext(ctx aws.Context, input *UpdateDataSourceInput, opts ...request.Option) (*UpdateDataSourceOutput, error) { + req, out := c.UpdateDataSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGraphqlApi = "UpdateGraphqlApi" + +// UpdateGraphqlApiRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGraphqlApi operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGraphqlApi for more information on using the UpdateGraphqlApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGraphqlApiRequest method. +// req, resp := client.UpdateGraphqlApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateGraphqlApi +func (c *AppSync) UpdateGraphqlApiRequest(input *UpdateGraphqlApiInput) (req *request.Request, output *UpdateGraphqlApiOutput) { + op := &request.Operation{ + Name: opUpdateGraphqlApi, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}", + } + + if input == nil { + input = &UpdateGraphqlApiInput{} + } + + output = &UpdateGraphqlApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGraphqlApi API operation for AWS AppSync. +// +// Updates a GraphqlApi object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation UpdateGraphqlApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateGraphqlApi +func (c *AppSync) UpdateGraphqlApi(input *UpdateGraphqlApiInput) (*UpdateGraphqlApiOutput, error) { + req, out := c.UpdateGraphqlApiRequest(input) + return out, req.Send() +} + +// UpdateGraphqlApiWithContext is the same as UpdateGraphqlApi with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGraphqlApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) UpdateGraphqlApiWithContext(ctx aws.Context, input *UpdateGraphqlApiInput, opts ...request.Option) (*UpdateGraphqlApiOutput, error) { + req, out := c.UpdateGraphqlApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateResolver = "UpdateResolver" + +// UpdateResolverRequest generates a "aws/request.Request" representing the +// client's request for the UpdateResolver operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateResolver for more information on using the UpdateResolver +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateResolverRequest method. +// req, resp := client.UpdateResolverRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolver +func (c *AppSync) UpdateResolverRequest(input *UpdateResolverInput) (req *request.Request, output *UpdateResolverOutput) { + op := &request.Operation{ + Name: opUpdateResolver, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}", + } + + if input == nil { + input = &UpdateResolverInput{} + } + + output = &UpdateResolverOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateResolver API operation for AWS AppSync. +// +// Updates a Resolver object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation UpdateResolver for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolver +func (c *AppSync) UpdateResolver(input *UpdateResolverInput) (*UpdateResolverOutput, error) { + req, out := c.UpdateResolverRequest(input) + return out, req.Send() +} + +// UpdateResolverWithContext is the same as UpdateResolver with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateResolver for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) UpdateResolverWithContext(ctx aws.Context, input *UpdateResolverInput, opts ...request.Option) (*UpdateResolverOutput, error) { + req, out := c.UpdateResolverRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateType = "UpdateType" + +// UpdateTypeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateType operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateType for more information on using the UpdateType +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTypeRequest method. +// req, resp := client.UpdateTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateType +func (c *AppSync) UpdateTypeRequest(input *UpdateTypeInput) (req *request.Request, output *UpdateTypeOutput) { + op := &request.Operation{ + Name: opUpdateType, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/types/{typeName}", + } + + if input == nil { + input = &UpdateTypeInput{} + } + + output = &UpdateTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateType API operation for AWS AppSync. +// +// Updates a Type object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS AppSync's +// API operation UpdateType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is being made. That modification must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateType +func (c *AppSync) UpdateType(input *UpdateTypeInput) (*UpdateTypeOutput, error) { + req, out := c.UpdateTypeRequest(input) + return out, req.Send() +} + +// UpdateTypeWithContext is the same as UpdateType with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateType for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, opts ...request.Option) (*UpdateTypeOutput, error) { + req, out := c.UpdateTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Describes an API key. +type ApiKey struct { + _ struct{} `type:"structure"` + + // A description of the purpose of the API key. + Description *string `locationName:"description" type:"string"` + + // The time after which the API key expires. The date is represented as seconds + // since the epoch, rounded down to the nearest hour. + Expires *int64 `locationName:"expires" type:"long"` + + // The API key ID. + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s ApiKey) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApiKey) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *ApiKey) SetDescription(v string) *ApiKey { + s.Description = &v + return s +} + +// SetExpires sets the Expires field's value. +func (s *ApiKey) SetExpires(v int64) *ApiKey { + s.Expires = &v + return s +} + +// SetId sets the Id field's value. +func (s *ApiKey) SetId(v string) *ApiKey { + s.Id = &v + return s +} + +type CreateApiKeyInput struct { + _ struct{} `type:"structure"` + + // The ID for your GraphQL API. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A description of the purpose of the API key. + Description *string `locationName:"description" type:"string"` + + // The time after which the API key expires. The date is represented as seconds + // since the epoch, rounded down to the nearest hour. The default value for + // this parameter is 7 days from creation time. + Expires *int64 `locationName:"expires" type:"long"` +} + +// String returns the string representation +func (s CreateApiKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApiKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApiKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApiKeyInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateApiKeyInput) SetApiId(v string) *CreateApiKeyInput { + s.ApiId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateApiKeyInput) SetDescription(v string) *CreateApiKeyInput { + s.Description = &v + return s +} + +// SetExpires sets the Expires field's value. +func (s *CreateApiKeyInput) SetExpires(v int64) *CreateApiKeyInput { + s.Expires = &v + return s +} + +type CreateApiKeyOutput struct { + _ struct{} `type:"structure"` + + // The API key. + ApiKey *ApiKey `locationName:"apiKey" type:"structure"` +} + +// String returns the string representation +func (s CreateApiKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApiKeyOutput) GoString() string { + return s.String() +} + +// SetApiKey sets the ApiKey field's value. +func (s *CreateApiKeyOutput) SetApiKey(v *ApiKey) *CreateApiKeyOutput { + s.ApiKey = v + return s +} + +type CreateDataSourceInput struct { + _ struct{} `type:"structure"` + + // The API ID for the GraphQL API for the DataSource. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A description of the DataSource. + Description *string `locationName:"description" type:"string"` + + // DynamoDB settings. + DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` + + // Amazon Elasticsearch settings. + ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + + // AWS Lambda settings. + LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` + + // A user-supplied name for the DataSource. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The IAM service role ARN for the data source. The system assumes this role + // when accessing the data source. + ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` + + // The type of the DataSource. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"DataSourceType"` +} + +// String returns the string representation +func (s CreateDataSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDataSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDataSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDataSourceInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.DynamodbConfig != nil { + if err := s.DynamodbConfig.Validate(); err != nil { + invalidParams.AddNested("DynamodbConfig", err.(request.ErrInvalidParams)) + } + } + if s.ElasticsearchConfig != nil { + if err := s.ElasticsearchConfig.Validate(); err != nil { + invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams)) + } + } + if s.LambdaConfig != nil { + if err := s.LambdaConfig.Validate(); err != nil { + invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateDataSourceInput) SetApiId(v string) *CreateDataSourceInput { + s.ApiId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateDataSourceInput) SetDescription(v string) *CreateDataSourceInput { + s.Description = &v + return s +} + +// SetDynamodbConfig sets the DynamodbConfig field's value. +func (s *CreateDataSourceInput) SetDynamodbConfig(v *DynamodbDataSourceConfig) *CreateDataSourceInput { + s.DynamodbConfig = v + return s +} + +// SetElasticsearchConfig sets the ElasticsearchConfig field's value. +func (s *CreateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *CreateDataSourceInput { + s.ElasticsearchConfig = v + return s +} + +// SetLambdaConfig sets the LambdaConfig field's value. +func (s *CreateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *CreateDataSourceInput { + s.LambdaConfig = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateDataSourceInput) SetName(v string) *CreateDataSourceInput { + s.Name = &v + return s +} + +// SetServiceRoleArn sets the ServiceRoleArn field's value. +func (s *CreateDataSourceInput) SetServiceRoleArn(v string) *CreateDataSourceInput { + s.ServiceRoleArn = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateDataSourceInput) SetType(v string) *CreateDataSourceInput { + s.Type = &v + return s +} + +type CreateDataSourceOutput struct { + _ struct{} `type:"structure"` + + // The DataSource object. + DataSource *DataSource `locationName:"dataSource" type:"structure"` +} + +// String returns the string representation +func (s CreateDataSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDataSourceOutput) GoString() string { + return s.String() +} + +// SetDataSource sets the DataSource field's value. +func (s *CreateDataSourceOutput) SetDataSource(v *DataSource) *CreateDataSourceOutput { + s.DataSource = v + return s +} + +type CreateGraphqlApiInput struct { + _ struct{} `type:"structure"` + + // The authentication type: API key, IAM, or Amazon Cognito User Pools. + // + // AuthenticationType is a required field + AuthenticationType *string `locationName:"authenticationType" type:"string" required:"true" enum:"AuthenticationType"` + + // A user-supplied name for the GraphqlApi. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The Amazon Cognito User Pool configuration. + UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` +} + +// String returns the string representation +func (s CreateGraphqlApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGraphqlApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGraphqlApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGraphqlApiInput"} + if s.AuthenticationType == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationType")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.UserPoolConfig != nil { + if err := s.UserPoolConfig.Validate(); err != nil { + invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthenticationType sets the AuthenticationType field's value. +func (s *CreateGraphqlApiInput) SetAuthenticationType(v string) *CreateGraphqlApiInput { + s.AuthenticationType = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateGraphqlApiInput) SetName(v string) *CreateGraphqlApiInput { + s.Name = &v + return s +} + +// SetUserPoolConfig sets the UserPoolConfig field's value. +func (s *CreateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *CreateGraphqlApiInput { + s.UserPoolConfig = v + return s +} + +type CreateGraphqlApiOutput struct { + _ struct{} `type:"structure"` + + // The GraphqlApi. + GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"` +} + +// String returns the string representation +func (s CreateGraphqlApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGraphqlApiOutput) GoString() string { + return s.String() +} + +// SetGraphqlApi sets the GraphqlApi field's value. +func (s *CreateGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *CreateGraphqlApiOutput { + s.GraphqlApi = v + return s +} + +type CreateResolverInput struct { + _ struct{} `type:"structure"` + + // The ID for the GraphQL API for which the resolver is being created. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The name of the data source for which the resolver is being created. + // + // DataSourceName is a required field + DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` + + // The name of the field to attach the resolver to. + // + // FieldName is a required field + FieldName *string `locationName:"fieldName" type:"string" required:"true"` + + // The mapping template to be used for requests. + // + // A resolver uses a request mapping template to convert a GraphQL expression + // into a format that a data source can understand. Mapping templates are written + // in Apache Velocity Template Language (VTL). + // + // RequestMappingTemplate is a required field + RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string" required:"true"` + + // The mapping template to be used for responses from the data source. + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + + // The name of the Type. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateResolverInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResolverInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResolverInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResolverInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.DataSourceName == nil { + invalidParams.Add(request.NewErrParamRequired("DataSourceName")) + } + if s.FieldName == nil { + invalidParams.Add(request.NewErrParamRequired("FieldName")) + } + if s.RequestMappingTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateResolverInput) SetApiId(v string) *CreateResolverInput { + s.ApiId = &v + return s +} + +// SetDataSourceName sets the DataSourceName field's value. +func (s *CreateResolverInput) SetDataSourceName(v string) *CreateResolverInput { + s.DataSourceName = &v + return s +} + +// SetFieldName sets the FieldName field's value. +func (s *CreateResolverInput) SetFieldName(v string) *CreateResolverInput { + s.FieldName = &v + return s +} + +// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. +func (s *CreateResolverInput) SetRequestMappingTemplate(v string) *CreateResolverInput { + s.RequestMappingTemplate = &v + return s +} + +// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. +func (s *CreateResolverInput) SetResponseMappingTemplate(v string) *CreateResolverInput { + s.ResponseMappingTemplate = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *CreateResolverInput) SetTypeName(v string) *CreateResolverInput { + s.TypeName = &v + return s +} + +type CreateResolverOutput struct { + _ struct{} `type:"structure"` + + // The Resolver object. + Resolver *Resolver `locationName:"resolver" type:"structure"` +} + +// String returns the string representation +func (s CreateResolverOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResolverOutput) GoString() string { + return s.String() +} + +// SetResolver sets the Resolver field's value. +func (s *CreateResolverOutput) SetResolver(v *Resolver) *CreateResolverOutput { + s.Resolver = v + return s +} + +type CreateTypeInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The type definition, in GraphQL Schema Definition Language (SDL) format. + // + // For more information, see the GraphQL SDL documentation (http://graphql.org/learn/schema/). + // + // Definition is a required field + Definition *string `locationName:"definition" type:"string" required:"true"` + + // The type format: SDL or JSON. + // + // Format is a required field + Format *string `locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` +} + +// String returns the string representation +func (s CreateTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTypeInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Definition == nil { + invalidParams.Add(request.NewErrParamRequired("Definition")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateTypeInput) SetApiId(v string) *CreateTypeInput { + s.ApiId = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *CreateTypeInput) SetDefinition(v string) *CreateTypeInput { + s.Definition = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *CreateTypeInput) SetFormat(v string) *CreateTypeInput { + s.Format = &v + return s +} + +type CreateTypeOutput struct { + _ struct{} `type:"structure"` + + // The Type object. + Type *Type `locationName:"type" type:"structure"` +} + +// String returns the string representation +func (s CreateTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTypeOutput) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *CreateTypeOutput) SetType(v *Type) *CreateTypeOutput { + s.Type = v + return s +} + +// Describes a data source. +type DataSource struct { + _ struct{} `type:"structure"` + + // The data source ARN. + DataSourceArn *string `locationName:"dataSourceArn" type:"string"` + + // The description of the data source. + Description *string `locationName:"description" type:"string"` + + // DynamoDB settings. + DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` + + // Amazon Elasticsearch settings. + ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + + // Lambda settings. + LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` + + // The name of the data source. + Name *string `locationName:"name" type:"string"` + + // The IAM service role ARN for the data source. The system assumes this role + // when accessing the data source. + ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` + + // The type of the data source. + // + // * AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table. + // + // * AMAZON_ELASTICSEARCH: The data source is an Amazon Elasticsearch Service + // domain. + // + // * AWS_LAMBDA: The data source is an AWS Lambda function. + // + // * NONE: There is no data source. This type is used when the required information + // can be computed on the fly without connecting to a back-end data source. + Type *string `locationName:"type" type:"string" enum:"DataSourceType"` +} + +// String returns the string representation +func (s DataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataSource) GoString() string { + return s.String() +} + +// SetDataSourceArn sets the DataSourceArn field's value. +func (s *DataSource) SetDataSourceArn(v string) *DataSource { + s.DataSourceArn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DataSource) SetDescription(v string) *DataSource { + s.Description = &v + return s +} + +// SetDynamodbConfig sets the DynamodbConfig field's value. +func (s *DataSource) SetDynamodbConfig(v *DynamodbDataSourceConfig) *DataSource { + s.DynamodbConfig = v + return s +} + +// SetElasticsearchConfig sets the ElasticsearchConfig field's value. +func (s *DataSource) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *DataSource { + s.ElasticsearchConfig = v + return s +} + +// SetLambdaConfig sets the LambdaConfig field's value. +func (s *DataSource) SetLambdaConfig(v *LambdaDataSourceConfig) *DataSource { + s.LambdaConfig = v + return s +} + +// SetName sets the Name field's value. +func (s *DataSource) SetName(v string) *DataSource { + s.Name = &v + return s +} + +// SetServiceRoleArn sets the ServiceRoleArn field's value. +func (s *DataSource) SetServiceRoleArn(v string) *DataSource { + s.ServiceRoleArn = &v + return s +} + +// SetType sets the Type field's value. +func (s *DataSource) SetType(v string) *DataSource { + s.Type = &v + return s +} + +type DeleteApiKeyInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The ID for the API key. + // + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApiKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteApiKeyInput) SetApiId(v string) *DeleteApiKeyInput { + s.ApiId = &v + return s +} + +// SetId sets the Id field's value. +func (s *DeleteApiKeyInput) SetId(v string) *DeleteApiKeyInput { + s.Id = &v + return s +} + +type DeleteApiKeyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApiKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApiKeyOutput) GoString() string { + return s.String() +} + +type DeleteDataSourceInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The name of the data source. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDataSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDataSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDataSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDataSourceInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteDataSourceInput) SetApiId(v string) *DeleteDataSourceInput { + s.ApiId = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteDataSourceInput) SetName(v string) *DeleteDataSourceInput { + s.Name = &v + return s +} + +type DeleteDataSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDataSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDataSourceOutput) GoString() string { + return s.String() +} + +type DeleteGraphqlApiInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGraphqlApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGraphqlApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGraphqlApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGraphqlApiInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteGraphqlApiInput) SetApiId(v string) *DeleteGraphqlApiInput { + s.ApiId = &v + return s +} + +type DeleteGraphqlApiOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteGraphqlApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGraphqlApiOutput) GoString() string { + return s.String() +} + +type DeleteResolverInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The resolver field name. + // + // FieldName is a required field + FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"` + + // The name of the resolver type. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResolverInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResolverInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResolverInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResolverInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.FieldName == nil { + invalidParams.Add(request.NewErrParamRequired("FieldName")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteResolverInput) SetApiId(v string) *DeleteResolverInput { + s.ApiId = &v + return s +} + +// SetFieldName sets the FieldName field's value. +func (s *DeleteResolverInput) SetFieldName(v string) *DeleteResolverInput { + s.FieldName = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *DeleteResolverInput) SetTypeName(v string) *DeleteResolverInput { + s.TypeName = &v + return s +} + +type DeleteResolverOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteResolverOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResolverOutput) GoString() string { + return s.String() +} + +type DeleteTypeInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The type name. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTypeInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteTypeInput) SetApiId(v string) *DeleteTypeInput { + s.ApiId = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *DeleteTypeInput) SetTypeName(v string) *DeleteTypeInput { + s.TypeName = &v + return s +} + +type DeleteTypeOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTypeOutput) GoString() string { + return s.String() +} + +// Describes a DynamoDB data source configuration. +type DynamodbDataSourceConfig struct { + _ struct{} `type:"structure"` + + // The AWS region. + // + // AwsRegion is a required field + AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` + + // The table name. + // + // TableName is a required field + TableName *string `locationName:"tableName" type:"string" required:"true"` + + // Set to TRUE to use Amazon Cognito credentials with this data source. + UseCallerCredentials *bool `locationName:"useCallerCredentials" type:"boolean"` +} + +// String returns the string representation +func (s DynamodbDataSourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DynamodbDataSourceConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DynamodbDataSourceConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DynamodbDataSourceConfig"} + if s.AwsRegion == nil { + invalidParams.Add(request.NewErrParamRequired("AwsRegion")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *DynamodbDataSourceConfig) SetAwsRegion(v string) *DynamodbDataSourceConfig { + s.AwsRegion = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *DynamodbDataSourceConfig) SetTableName(v string) *DynamodbDataSourceConfig { + s.TableName = &v + return s +} + +// SetUseCallerCredentials sets the UseCallerCredentials field's value. +func (s *DynamodbDataSourceConfig) SetUseCallerCredentials(v bool) *DynamodbDataSourceConfig { + s.UseCallerCredentials = &v + return s +} + +// Describes an Elasticsearch data source configuration. +type ElasticsearchDataSourceConfig struct { + _ struct{} `type:"structure"` + + // The AWS region. + // + // AwsRegion is a required field + AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` + + // The endpoint. + // + // Endpoint is a required field + Endpoint *string `locationName:"endpoint" type:"string" required:"true"` +} + +// String returns the string representation +func (s ElasticsearchDataSourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticsearchDataSourceConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ElasticsearchDataSourceConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDataSourceConfig"} + if s.AwsRegion == nil { + invalidParams.Add(request.NewErrParamRequired("AwsRegion")) + } + if s.Endpoint == nil { + invalidParams.Add(request.NewErrParamRequired("Endpoint")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *ElasticsearchDataSourceConfig) SetAwsRegion(v string) *ElasticsearchDataSourceConfig { + s.AwsRegion = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *ElasticsearchDataSourceConfig) SetEndpoint(v string) *ElasticsearchDataSourceConfig { + s.Endpoint = &v + return s +} + +type GetDataSourceInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The name of the data source. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDataSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDataSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDataSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDataSourceInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetDataSourceInput) SetApiId(v string) *GetDataSourceInput { + s.ApiId = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetDataSourceInput) SetName(v string) *GetDataSourceInput { + s.Name = &v + return s +} + +type GetDataSourceOutput struct { + _ struct{} `type:"structure"` + + // The DataSource object. + DataSource *DataSource `locationName:"dataSource" type:"structure"` +} + +// String returns the string representation +func (s GetDataSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDataSourceOutput) GoString() string { + return s.String() +} + +// SetDataSource sets the DataSource field's value. +func (s *GetDataSourceOutput) SetDataSource(v *DataSource) *GetDataSourceOutput { + s.DataSource = v + return s +} + +type GetGraphqlApiInput struct { + _ struct{} `type:"structure"` + + // The API ID for the GraphQL API. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGraphqlApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGraphqlApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGraphqlApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGraphqlApiInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetGraphqlApiInput) SetApiId(v string) *GetGraphqlApiInput { + s.ApiId = &v + return s +} + +type GetGraphqlApiOutput struct { + _ struct{} `type:"structure"` + + // The GraphqlApi object. + GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"` +} + +// String returns the string representation +func (s GetGraphqlApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGraphqlApiOutput) GoString() string { + return s.String() +} + +// SetGraphqlApi sets the GraphqlApi field's value. +func (s *GetGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *GetGraphqlApiOutput { + s.GraphqlApi = v + return s +} + +type GetIntrospectionSchemaInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The schema format: SDL or JSON. + // + // Format is a required field + Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"OutputType"` +} + +// String returns the string representation +func (s GetIntrospectionSchemaInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntrospectionSchemaInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetIntrospectionSchemaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetIntrospectionSchemaInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetIntrospectionSchemaInput) SetApiId(v string) *GetIntrospectionSchemaInput { + s.ApiId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *GetIntrospectionSchemaInput) SetFormat(v string) *GetIntrospectionSchemaInput { + s.Format = &v + return s +} + +type GetIntrospectionSchemaOutput struct { + _ struct{} `type:"structure" payload:"Schema"` + + // The schema, in GraphQL Schema Definition Language (SDL) format. + // + // For more information, see the GraphQL SDL documentation (http://graphql.org/learn/schema/). + Schema []byte `locationName:"schema" type:"blob"` +} + +// String returns the string representation +func (s GetIntrospectionSchemaOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntrospectionSchemaOutput) GoString() string { + return s.String() +} + +// SetSchema sets the Schema field's value. +func (s *GetIntrospectionSchemaOutput) SetSchema(v []byte) *GetIntrospectionSchemaOutput { + s.Schema = v + return s +} + +type GetResolverInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The resolver field name. + // + // FieldName is a required field + FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"` + + // The resolver type name. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResolverInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResolverInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResolverInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.FieldName == nil { + invalidParams.Add(request.NewErrParamRequired("FieldName")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetResolverInput) SetApiId(v string) *GetResolverInput { + s.ApiId = &v + return s +} + +// SetFieldName sets the FieldName field's value. +func (s *GetResolverInput) SetFieldName(v string) *GetResolverInput { + s.FieldName = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *GetResolverInput) SetTypeName(v string) *GetResolverInput { + s.TypeName = &v + return s +} + +type GetResolverOutput struct { + _ struct{} `type:"structure"` + + // The Resolver object. + Resolver *Resolver `locationName:"resolver" type:"structure"` +} + +// String returns the string representation +func (s GetResolverOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverOutput) GoString() string { + return s.String() +} + +// SetResolver sets the Resolver field's value. +func (s *GetResolverOutput) SetResolver(v *Resolver) *GetResolverOutput { + s.Resolver = v + return s +} + +type GetSchemaCreationStatusInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSchemaCreationStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSchemaCreationStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSchemaCreationStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSchemaCreationStatusInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetSchemaCreationStatusInput) SetApiId(v string) *GetSchemaCreationStatusInput { + s.ApiId = &v + return s +} + +type GetSchemaCreationStatusOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about the status of the schema creation operation. + Details *string `locationName:"details" type:"string"` + + // The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the + // schema is in the ACTIVE state, you can add data. + Status *string `locationName:"status" type:"string" enum:"SchemaStatus"` +} + +// String returns the string representation +func (s GetSchemaCreationStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSchemaCreationStatusOutput) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *GetSchemaCreationStatusOutput) SetDetails(v string) *GetSchemaCreationStatusOutput { + s.Details = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetSchemaCreationStatusOutput) SetStatus(v string) *GetSchemaCreationStatusOutput { + s.Status = &v + return s +} + +type GetTypeInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The type format: SDL or JSON. + // + // Format is a required field + Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` + + // The type name. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTypeInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetTypeInput) SetApiId(v string) *GetTypeInput { + s.ApiId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *GetTypeInput) SetFormat(v string) *GetTypeInput { + s.Format = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *GetTypeInput) SetTypeName(v string) *GetTypeInput { + s.TypeName = &v + return s +} + +type GetTypeOutput struct { + _ struct{} `type:"structure"` + + // The Type object. + Type *Type `locationName:"type" type:"structure"` +} + +// String returns the string representation +func (s GetTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTypeOutput) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *GetTypeOutput) SetType(v *Type) *GetTypeOutput { + s.Type = v + return s +} + +// Describes a GraphQL API. +type GraphqlApi struct { + _ struct{} `type:"structure"` + + // The API ID. + ApiId *string `locationName:"apiId" type:"string"` + + // The ARN. + Arn *string `locationName:"arn" type:"string"` + + // The authentication type. + AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` + + // The API name. + Name *string `locationName:"name" type:"string"` + + // The URIs. + Uris map[string]*string `locationName:"uris" type:"map"` + + // The Amazon Cognito User Pool configuration. + UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` +} + +// String returns the string representation +func (s GraphqlApi) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GraphqlApi) GoString() string { + return s.String() +} + +// SetApiId sets the ApiId field's value. +func (s *GraphqlApi) SetApiId(v string) *GraphqlApi { + s.ApiId = &v + return s +} + +// SetArn sets the Arn field's value. +func (s *GraphqlApi) SetArn(v string) *GraphqlApi { + s.Arn = &v + return s +} + +// SetAuthenticationType sets the AuthenticationType field's value. +func (s *GraphqlApi) SetAuthenticationType(v string) *GraphqlApi { + s.AuthenticationType = &v + return s +} + +// SetName sets the Name field's value. +func (s *GraphqlApi) SetName(v string) *GraphqlApi { + s.Name = &v + return s +} + +// SetUris sets the Uris field's value. +func (s *GraphqlApi) SetUris(v map[string]*string) *GraphqlApi { + s.Uris = v + return s +} + +// SetUserPoolConfig sets the UserPoolConfig field's value. +func (s *GraphqlApi) SetUserPoolConfig(v *UserPoolConfig) *GraphqlApi { + s.UserPoolConfig = v + return s +} + +// Describes a Lambda data source configuration. +type LambdaDataSourceConfig struct { + _ struct{} `type:"structure"` + + // The ARN for the Lambda function. + // + // LambdaFunctionArn is a required field + LambdaFunctionArn *string `locationName:"lambdaFunctionArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s LambdaDataSourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaDataSourceConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LambdaDataSourceConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LambdaDataSourceConfig"} + if s.LambdaFunctionArn == nil { + invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLambdaFunctionArn sets the LambdaFunctionArn field's value. +func (s *LambdaDataSourceConfig) SetLambdaFunctionArn(v string) *LambdaDataSourceConfig { + s.LambdaFunctionArn = &v + return s +} + +type ListApiKeysInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The maximum number of results you want the request to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListApiKeysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApiKeysInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListApiKeysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListApiKeysInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *ListApiKeysInput) SetApiId(v string) *ListApiKeysInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListApiKeysInput) SetMaxResults(v int64) *ListApiKeysInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApiKeysInput) SetNextToken(v string) *ListApiKeysInput { + s.NextToken = &v + return s +} + +type ListApiKeysOutput struct { + _ struct{} `type:"structure"` + + // The ApiKey objects. + ApiKeys []*ApiKey `locationName:"apiKeys" type:"list"` + + // An identifier to be passed in the next request to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListApiKeysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApiKeysOutput) GoString() string { + return s.String() +} + +// SetApiKeys sets the ApiKeys field's value. +func (s *ListApiKeysOutput) SetApiKeys(v []*ApiKey) *ListApiKeysOutput { + s.ApiKeys = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApiKeysOutput) SetNextToken(v string) *ListApiKeysOutput { + s.NextToken = &v + return s +} + +type ListDataSourcesInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The maximum number of results you want the request to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListDataSourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDataSourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDataSourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDataSourcesInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *ListDataSourcesInput) SetApiId(v string) *ListDataSourcesInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDataSourcesInput) SetMaxResults(v int64) *ListDataSourcesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDataSourcesInput) SetNextToken(v string) *ListDataSourcesInput { + s.NextToken = &v + return s +} + +type ListDataSourcesOutput struct { + _ struct{} `type:"structure"` + + // The DataSource objects. + DataSources []*DataSource `locationName:"dataSources" type:"list"` + + // An identifier to be passed in the next request to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListDataSourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDataSourcesOutput) GoString() string { + return s.String() +} + +// SetDataSources sets the DataSources field's value. +func (s *ListDataSourcesOutput) SetDataSources(v []*DataSource) *ListDataSourcesOutput { + s.DataSources = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDataSourcesOutput) SetNextToken(v string) *ListDataSourcesOutput { + s.NextToken = &v + return s +} + +type ListGraphqlApisInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results you want the request to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListGraphqlApisInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGraphqlApisInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListGraphqlApisInput) SetMaxResults(v int64) *ListGraphqlApisInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGraphqlApisInput) SetNextToken(v string) *ListGraphqlApisInput { + s.NextToken = &v + return s +} + +type ListGraphqlApisOutput struct { + _ struct{} `type:"structure"` + + // The GraphqlApi objects. + GraphqlApis []*GraphqlApi `locationName:"graphqlApis" type:"list"` + + // An identifier to be passed in the next request to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListGraphqlApisOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGraphqlApisOutput) GoString() string { + return s.String() +} + +// SetGraphqlApis sets the GraphqlApis field's value. +func (s *ListGraphqlApisOutput) SetGraphqlApis(v []*GraphqlApi) *ListGraphqlApisOutput { + s.GraphqlApis = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGraphqlApisOutput) SetNextToken(v string) *ListGraphqlApisOutput { + s.NextToken = &v + return s +} + +type ListResolversInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The maximum number of results you want the request to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The type name. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListResolversInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolversInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResolversInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResolversInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *ListResolversInput) SetApiId(v string) *ListResolversInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolversInput) SetMaxResults(v int64) *ListResolversInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolversInput) SetNextToken(v string) *ListResolversInput { + s.NextToken = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *ListResolversInput) SetTypeName(v string) *ListResolversInput { + s.TypeName = &v + return s +} + +type ListResolversOutput struct { + _ struct{} `type:"structure"` + + // An identifier to be passed in the next request to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" type:"string"` + + // The Resolver objects. + Resolvers []*Resolver `locationName:"resolvers" type:"list"` +} + +// String returns the string representation +func (s ListResolversOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolversOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolversOutput) SetNextToken(v string) *ListResolversOutput { + s.NextToken = &v + return s +} + +// SetResolvers sets the Resolvers field's value. +func (s *ListResolversOutput) SetResolvers(v []*Resolver) *ListResolversOutput { + s.Resolvers = v + return s +} + +type ListTypesInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The type format: SDL or JSON. + // + // Format is a required field + Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` + + // The maximum number of results you want the request to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTypesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTypesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTypesInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *ListTypesInput) SetApiId(v string) *ListTypesInput { + s.ApiId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *ListTypesInput) SetFormat(v string) *ListTypesInput { + s.Format = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTypesInput) SetMaxResults(v int64) *ListTypesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTypesInput) SetNextToken(v string) *ListTypesInput { + s.NextToken = &v + return s +} + +type ListTypesOutput struct { + _ struct{} `type:"structure"` + + // An identifier to be passed in the next request to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" type:"string"` + + // The Type objects. + Types []*Type `locationName:"types" type:"list"` +} + +// String returns the string representation +func (s ListTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTypesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTypesOutput) SetNextToken(v string) *ListTypesOutput { + s.NextToken = &v + return s +} + +// SetTypes sets the Types field's value. +func (s *ListTypesOutput) SetTypes(v []*Type) *ListTypesOutput { + s.Types = v + return s +} + +// Describes a resolver. +type Resolver struct { + _ struct{} `type:"structure"` + + // The resolver data source name. + DataSourceName *string `locationName:"dataSourceName" type:"string"` + + // The resolver field name. + FieldName *string `locationName:"fieldName" type:"string"` + + // The request mapping template. + RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string"` + + // The resolver ARN. + ResolverArn *string `locationName:"resolverArn" type:"string"` + + // The response mapping template. + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + + // The resolver type name. + TypeName *string `locationName:"typeName" type:"string"` +} + +// String returns the string representation +func (s Resolver) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Resolver) GoString() string { + return s.String() +} + +// SetDataSourceName sets the DataSourceName field's value. +func (s *Resolver) SetDataSourceName(v string) *Resolver { + s.DataSourceName = &v + return s +} + +// SetFieldName sets the FieldName field's value. +func (s *Resolver) SetFieldName(v string) *Resolver { + s.FieldName = &v + return s +} + +// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. +func (s *Resolver) SetRequestMappingTemplate(v string) *Resolver { + s.RequestMappingTemplate = &v + return s +} + +// SetResolverArn sets the ResolverArn field's value. +func (s *Resolver) SetResolverArn(v string) *Resolver { + s.ResolverArn = &v + return s +} + +// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. +func (s *Resolver) SetResponseMappingTemplate(v string) *Resolver { + s.ResponseMappingTemplate = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *Resolver) SetTypeName(v string) *Resolver { + s.TypeName = &v + return s +} + +type StartSchemaCreationInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The schema definition, in GraphQL schema language format. + // + // Definition is automatically base64 encoded/decoded by the SDK. + // + // Definition is a required field + Definition []byte `locationName:"definition" type:"blob" required:"true"` +} + +// String returns the string representation +func (s StartSchemaCreationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartSchemaCreationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartSchemaCreationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartSchemaCreationInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Definition == nil { + invalidParams.Add(request.NewErrParamRequired("Definition")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *StartSchemaCreationInput) SetApiId(v string) *StartSchemaCreationInput { + s.ApiId = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *StartSchemaCreationInput) SetDefinition(v []byte) *StartSchemaCreationInput { + s.Definition = v + return s +} + +type StartSchemaCreationOutput struct { + _ struct{} `type:"structure"` + + // The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the + // schema is in the ACTIVE state, you can add data. + Status *string `locationName:"status" type:"string" enum:"SchemaStatus"` +} + +// String returns the string representation +func (s StartSchemaCreationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartSchemaCreationOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *StartSchemaCreationOutput) SetStatus(v string) *StartSchemaCreationOutput { + s.Status = &v + return s +} + +// Describes a type. +type Type struct { + _ struct{} `type:"structure"` + + // The type ARN. + Arn *string `locationName:"arn" type:"string"` + + // The type definition. + Definition *string `locationName:"definition" type:"string"` + + // The type description. + Description *string `locationName:"description" type:"string"` + + // The type format: SDL or JSON. + Format *string `locationName:"format" type:"string" enum:"TypeDefinitionFormat"` + + // The type name. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s Type) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Type) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Type) SetArn(v string) *Type { + s.Arn = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *Type) SetDefinition(v string) *Type { + s.Definition = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Type) SetDescription(v string) *Type { + s.Description = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *Type) SetFormat(v string) *Type { + s.Format = &v + return s +} + +// SetName sets the Name field's value. +func (s *Type) SetName(v string) *Type { + s.Name = &v + return s +} + +type UpdateApiKeyInput struct { + _ struct{} `type:"structure"` + + // The ID for the GraphQL API + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A description of the purpose of the API key. + Description *string `locationName:"description" type:"string"` + + // The time after which the API key expires. The date is represented as seconds + // since the epoch. + Expires *int64 `locationName:"expires" type:"long"` + + // The API key ID. + // + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApiKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateApiKeyInput) SetApiId(v string) *UpdateApiKeyInput { + s.ApiId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateApiKeyInput) SetDescription(v string) *UpdateApiKeyInput { + s.Description = &v + return s +} + +// SetExpires sets the Expires field's value. +func (s *UpdateApiKeyInput) SetExpires(v int64) *UpdateApiKeyInput { + s.Expires = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateApiKeyInput) SetId(v string) *UpdateApiKeyInput { + s.Id = &v + return s +} + +type UpdateApiKeyOutput struct { + _ struct{} `type:"structure"` + + // The API key. + ApiKey *ApiKey `locationName:"apiKey" type:"structure"` +} + +// String returns the string representation +func (s UpdateApiKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApiKeyOutput) GoString() string { + return s.String() +} + +// SetApiKey sets the ApiKey field's value. +func (s *UpdateApiKeyOutput) SetApiKey(v *ApiKey) *UpdateApiKeyOutput { + s.ApiKey = v + return s +} + +type UpdateDataSourceInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The new description for the data source. + Description *string `locationName:"description" type:"string"` + + // The new DynamoDB configuration. + DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` + + // The new Elasticsearch configuration. + ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + + // The new Lambda configuration. + LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` + + // The new name for the data source. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` + + // The new service role ARN for the data source. + ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` + + // The new data source type. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"DataSourceType"` +} + +// String returns the string representation +func (s UpdateDataSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDataSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDataSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDataSourceInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.DynamodbConfig != nil { + if err := s.DynamodbConfig.Validate(); err != nil { + invalidParams.AddNested("DynamodbConfig", err.(request.ErrInvalidParams)) + } + } + if s.ElasticsearchConfig != nil { + if err := s.ElasticsearchConfig.Validate(); err != nil { + invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams)) + } + } + if s.LambdaConfig != nil { + if err := s.LambdaConfig.Validate(); err != nil { + invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateDataSourceInput) SetApiId(v string) *UpdateDataSourceInput { + s.ApiId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateDataSourceInput) SetDescription(v string) *UpdateDataSourceInput { + s.Description = &v + return s +} + +// SetDynamodbConfig sets the DynamodbConfig field's value. +func (s *UpdateDataSourceInput) SetDynamodbConfig(v *DynamodbDataSourceConfig) *UpdateDataSourceInput { + s.DynamodbConfig = v + return s +} + +// SetElasticsearchConfig sets the ElasticsearchConfig field's value. +func (s *UpdateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *UpdateDataSourceInput { + s.ElasticsearchConfig = v + return s +} + +// SetLambdaConfig sets the LambdaConfig field's value. +func (s *UpdateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *UpdateDataSourceInput { + s.LambdaConfig = v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateDataSourceInput) SetName(v string) *UpdateDataSourceInput { + s.Name = &v + return s +} + +// SetServiceRoleArn sets the ServiceRoleArn field's value. +func (s *UpdateDataSourceInput) SetServiceRoleArn(v string) *UpdateDataSourceInput { + s.ServiceRoleArn = &v + return s +} + +// SetType sets the Type field's value. +func (s *UpdateDataSourceInput) SetType(v string) *UpdateDataSourceInput { + s.Type = &v + return s +} + +type UpdateDataSourceOutput struct { + _ struct{} `type:"structure"` + + // The updated DataSource object. + DataSource *DataSource `locationName:"dataSource" type:"structure"` +} + +// String returns the string representation +func (s UpdateDataSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDataSourceOutput) GoString() string { + return s.String() +} + +// SetDataSource sets the DataSource field's value. +func (s *UpdateDataSourceOutput) SetDataSource(v *DataSource) *UpdateDataSourceOutput { + s.DataSource = v + return s +} + +type UpdateGraphqlApiInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The new authentication type for the GraphqlApi object. + AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` + + // The new name for the GraphqlApi object. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The new Amazon Cognito User Pool configuration for the GraphqlApi object. + UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` +} + +// String returns the string representation +func (s UpdateGraphqlApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGraphqlApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGraphqlApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGraphqlApiInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.UserPoolConfig != nil { + if err := s.UserPoolConfig.Validate(); err != nil { + invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateGraphqlApiInput) SetApiId(v string) *UpdateGraphqlApiInput { + s.ApiId = &v + return s +} + +// SetAuthenticationType sets the AuthenticationType field's value. +func (s *UpdateGraphqlApiInput) SetAuthenticationType(v string) *UpdateGraphqlApiInput { + s.AuthenticationType = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateGraphqlApiInput) SetName(v string) *UpdateGraphqlApiInput { + s.Name = &v + return s +} + +// SetUserPoolConfig sets the UserPoolConfig field's value. +func (s *UpdateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *UpdateGraphqlApiInput { + s.UserPoolConfig = v + return s +} + +type UpdateGraphqlApiOutput struct { + _ struct{} `type:"structure"` + + // The updated GraphqlApi object. + GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"` +} + +// String returns the string representation +func (s UpdateGraphqlApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGraphqlApiOutput) GoString() string { + return s.String() +} + +// SetGraphqlApi sets the GraphqlApi field's value. +func (s *UpdateGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *UpdateGraphqlApiOutput { + s.GraphqlApi = v + return s +} + +type UpdateResolverInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The new data source name. + // + // DataSourceName is a required field + DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` + + // The new field name. + // + // FieldName is a required field + FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"` + + // The new request mapping template. + // + // RequestMappingTemplate is a required field + RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string" required:"true"` + + // The new response mapping template. + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + + // The new type name. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateResolverInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResolverInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateResolverInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateResolverInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.DataSourceName == nil { + invalidParams.Add(request.NewErrParamRequired("DataSourceName")) + } + if s.FieldName == nil { + invalidParams.Add(request.NewErrParamRequired("FieldName")) + } + if s.RequestMappingTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateResolverInput) SetApiId(v string) *UpdateResolverInput { + s.ApiId = &v + return s +} + +// SetDataSourceName sets the DataSourceName field's value. +func (s *UpdateResolverInput) SetDataSourceName(v string) *UpdateResolverInput { + s.DataSourceName = &v + return s +} + +// SetFieldName sets the FieldName field's value. +func (s *UpdateResolverInput) SetFieldName(v string) *UpdateResolverInput { + s.FieldName = &v + return s +} + +// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. +func (s *UpdateResolverInput) SetRequestMappingTemplate(v string) *UpdateResolverInput { + s.RequestMappingTemplate = &v + return s +} + +// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. +func (s *UpdateResolverInput) SetResponseMappingTemplate(v string) *UpdateResolverInput { + s.ResponseMappingTemplate = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *UpdateResolverInput) SetTypeName(v string) *UpdateResolverInput { + s.TypeName = &v + return s +} + +type UpdateResolverOutput struct { + _ struct{} `type:"structure"` + + // The updated Resolver object. + Resolver *Resolver `locationName:"resolver" type:"structure"` +} + +// String returns the string representation +func (s UpdateResolverOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResolverOutput) GoString() string { + return s.String() +} + +// SetResolver sets the Resolver field's value. +func (s *UpdateResolverOutput) SetResolver(v *Resolver) *UpdateResolverOutput { + s.Resolver = v + return s +} + +type UpdateTypeInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The new definition. + Definition *string `locationName:"definition" type:"string"` + + // The new type format: SDL or JSON. + // + // Format is a required field + Format *string `locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"` + + // The new type name. + // + // TypeName is a required field + TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTypeInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateTypeInput) SetApiId(v string) *UpdateTypeInput { + s.ApiId = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *UpdateTypeInput) SetDefinition(v string) *UpdateTypeInput { + s.Definition = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *UpdateTypeInput) SetFormat(v string) *UpdateTypeInput { + s.Format = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *UpdateTypeInput) SetTypeName(v string) *UpdateTypeInput { + s.TypeName = &v + return s +} + +type UpdateTypeOutput struct { + _ struct{} `type:"structure"` + + // The updated Type object. + Type *Type `locationName:"type" type:"structure"` +} + +// String returns the string representation +func (s UpdateTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTypeOutput) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *UpdateTypeOutput) SetType(v *Type) *UpdateTypeOutput { + s.Type = v + return s +} + +// Describes an Amazon Cognito User Pool configuration. +type UserPoolConfig struct { + _ struct{} `type:"structure"` + + // A regular expression for validating the incoming Amazon Cognito User Pool + // app client ID. + AppIdClientRegex *string `locationName:"appIdClientRegex" type:"string"` + + // The AWS region in which the user pool was created. + // + // AwsRegion is a required field + AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` + + // The action that you want your GraphQL API to take when a request that uses + // Amazon Cognito User Pool authentication doesn't match the Amazon Cognito + // User Pool configuration. + // + // DefaultAction is a required field + DefaultAction *string `locationName:"defaultAction" type:"string" required:"true" enum:"DefaultAction"` + + // The user pool ID. + // + // UserPoolId is a required field + UserPoolId *string `locationName:"userPoolId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UserPoolConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UserPoolConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UserPoolConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UserPoolConfig"} + if s.AwsRegion == nil { + invalidParams.Add(request.NewErrParamRequired("AwsRegion")) + } + if s.DefaultAction == nil { + invalidParams.Add(request.NewErrParamRequired("DefaultAction")) + } + if s.UserPoolId == nil { + invalidParams.Add(request.NewErrParamRequired("UserPoolId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAppIdClientRegex sets the AppIdClientRegex field's value. +func (s *UserPoolConfig) SetAppIdClientRegex(v string) *UserPoolConfig { + s.AppIdClientRegex = &v + return s +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *UserPoolConfig) SetAwsRegion(v string) *UserPoolConfig { + s.AwsRegion = &v + return s +} + +// SetDefaultAction sets the DefaultAction field's value. +func (s *UserPoolConfig) SetDefaultAction(v string) *UserPoolConfig { + s.DefaultAction = &v + return s +} + +// SetUserPoolId sets the UserPoolId field's value. +func (s *UserPoolConfig) SetUserPoolId(v string) *UserPoolConfig { + s.UserPoolId = &v + return s +} + +const ( + // AuthenticationTypeApiKey is a AuthenticationType enum value + AuthenticationTypeApiKey = "API_KEY" + + // AuthenticationTypeAwsIam is a AuthenticationType enum value + AuthenticationTypeAwsIam = "AWS_IAM" + + // AuthenticationTypeAmazonCognitoUserPools is a AuthenticationType enum value + AuthenticationTypeAmazonCognitoUserPools = "AMAZON_COGNITO_USER_POOLS" +) + +const ( + // DataSourceTypeAwsLambda is a DataSourceType enum value + DataSourceTypeAwsLambda = "AWS_LAMBDA" + + // DataSourceTypeAmazonDynamodb is a DataSourceType enum value + DataSourceTypeAmazonDynamodb = "AMAZON_DYNAMODB" + + // DataSourceTypeAmazonElasticsearch is a DataSourceType enum value + DataSourceTypeAmazonElasticsearch = "AMAZON_ELASTICSEARCH" + + // DataSourceTypeNone is a DataSourceType enum value + DataSourceTypeNone = "NONE" +) + +const ( + // DefaultActionAllow is a DefaultAction enum value + DefaultActionAllow = "ALLOW" + + // DefaultActionDeny is a DefaultAction enum value + DefaultActionDeny = "DENY" +) + +const ( + // OutputTypeSdl is a OutputType enum value + OutputTypeSdl = "SDL" + + // OutputTypeJson is a OutputType enum value + OutputTypeJson = "JSON" +) + +const ( + // SchemaStatusProcessing is a SchemaStatus enum value + SchemaStatusProcessing = "PROCESSING" + + // SchemaStatusActive is a SchemaStatus enum value + SchemaStatusActive = "ACTIVE" + + // SchemaStatusDeleting is a SchemaStatus enum value + SchemaStatusDeleting = "DELETING" +) + +const ( + // TypeDefinitionFormatSdl is a TypeDefinitionFormat enum value + TypeDefinitionFormatSdl = "SDL" + + // TypeDefinitionFormatJson is a TypeDefinitionFormat enum value + TypeDefinitionFormatJson = "JSON" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go new file mode 100644 index 000000000000..2b6bd39070a7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/doc.go @@ -0,0 +1,29 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package appsync provides the client and types for making API +// requests to AWS AppSync. +// +// AWS AppSync provides API actions for creating and interacting with data sources +// using GraphQL from your application. +// +// See https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25 for more information on this service. +// +// See appsync package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/appsync/ +// +// Using the Client +// +// To contact AWS AppSync with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS AppSync client AppSync for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/appsync/#New +package appsync diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go new file mode 100644 index 000000000000..a2a7a0a0ca39 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go @@ -0,0 +1,69 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package appsync + +const ( + + // ErrCodeApiKeyLimitExceededException for service response error code + // "ApiKeyLimitExceededException". + // + // The API key exceeded a limit. Try your request again. + ErrCodeApiKeyLimitExceededException = "ApiKeyLimitExceededException" + + // ErrCodeApiKeyValidityOutOfBoundsException for service response error code + // "ApiKeyValidityOutOfBoundsException". + // + // The API key expiration must be set to a value between 1 and 365 days. + ErrCodeApiKeyValidityOutOfBoundsException = "ApiKeyValidityOutOfBoundsException" + + // ErrCodeApiLimitExceededException for service response error code + // "ApiLimitExceededException". + // + // The GraphQL API exceeded a limit. Try your request again. + ErrCodeApiLimitExceededException = "ApiLimitExceededException" + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // The request is not well formed. For example, a value is invalid or a required + // field is missing. Check the field values, and try again. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConcurrentModificationException for service response error code + // "ConcurrentModificationException". + // + // Another modification is being made. That modification must complete before + // you can make your change. + ErrCodeConcurrentModificationException = "ConcurrentModificationException" + + // ErrCodeGraphQLSchemaException for service response error code + // "GraphQLSchemaException". + // + // The GraphQL schema is not valid. + ErrCodeGraphQLSchemaException = "GraphQLSchemaException" + + // ErrCodeInternalFailureException for service response error code + // "InternalFailureException". + // + // An internal AWS AppSync error occurred. Try your request again. + ErrCodeInternalFailureException = "InternalFailureException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request exceeded a limit. Try your request again. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // The resource specified in the request was not found. Check the resource and + // try again. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeUnauthorizedException for service response error code + // "UnauthorizedException". + // + // You are not authorized to perform this operation. + ErrCodeUnauthorizedException = "UnauthorizedException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go new file mode 100644 index 000000000000..cdc4698e8e47 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package appsync + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// AppSync provides the API operation methods for making requests to +// AWS AppSync. See this package's package overview docs +// for details on the service. +// +// AppSync methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type AppSync struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "appsync" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the AppSync 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 AppSync client from just a session. +// svc := appsync.New(mySession) +// +// // Create a AppSync client with additional configuration +// svc := appsync.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *AppSync { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *AppSync { + if len(signingName) == 0 { + signingName = "appsync" + } + svc := &AppSync{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-07-25", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a AppSync operation and runs any +// custom request initialization. +func (c *AppSync) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index 2e5b4389cfe9..168fe2192dfb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -6280,6 +6280,89 @@ func (c *CognitoIdentityProvider) GetIdentityProviderByIdentifierWithContext(ctx return out, req.Send() } +const opGetSigningCertificate = "GetSigningCertificate" + +// GetSigningCertificateRequest generates a "aws/request.Request" representing the +// client's request for the GetSigningCertificate operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSigningCertificate for more information on using the GetSigningCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSigningCertificateRequest method. +// req, resp := client.GetSigningCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetSigningCertificate +func (c *CognitoIdentityProvider) GetSigningCertificateRequest(input *GetSigningCertificateInput) (req *request.Request, output *GetSigningCertificateOutput) { + op := &request.Operation{ + Name: opGetSigningCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSigningCertificateInput{} + } + + output = &GetSigningCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSigningCertificate API operation for Amazon Cognito Identity Provider. +// +// This method takes a user pool ID, and returns the signing certificate. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Cognito Identity Provider's +// API operation GetSigningCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// This exception is thrown when Amazon Cognito encounters an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when the Amazon Cognito service cannot find the +// requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetSigningCertificate +func (c *CognitoIdentityProvider) GetSigningCertificate(input *GetSigningCertificateInput) (*GetSigningCertificateOutput, error) { + req, out := c.GetSigningCertificateRequest(input) + return out, req.Send() +} + +// GetSigningCertificateWithContext is the same as GetSigningCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See GetSigningCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CognitoIdentityProvider) GetSigningCertificateWithContext(ctx aws.Context, input *GetSigningCertificateInput, opts ...request.Option) (*GetSigningCertificateOutput, error) { + req, out := c.GetSigningCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetUICustomization = "GetUICustomization" // GetUICustomizationRequest generates a "aws/request.Request" representing the @@ -11510,6 +11593,9 @@ type AdminInitiateAuthInput struct { // * USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables // to be used for next challenge execution. // + // * USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the + // next challenge or tokens. + // // Valid values include: // // * USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) @@ -11524,6 +11610,11 @@ type AdminInitiateAuthInput struct { // USERNAME and PASSWORD directly if the flow is enabled for calling the // app client. // + // * USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD + // are passed directly. If a user migration Lambda trigger is set, this flow + // will invoke the user migration Lambda if the USERNAME is not found in + // the user pool. + // // AuthFlow is a required field AuthFlow *string `type:"string" required:"true" enum:"AuthFlowType"` @@ -11533,9 +11624,8 @@ type AdminInitiateAuthInput struct { // * For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH // (required if the app client is configured with a client secret), DEVICE_KEY // - // * For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: USERNAME (required), SECRET_HASH - // (required if the app client is configured with a client secret), REFRESH_TOKEN - // (required), DEVICE_KEY + // * For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH + // (required if the app client is configured with a client secret), DEVICE_KEY // // * For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client // is configured with client secret), PASSWORD (required), DEVICE_KEY @@ -11693,7 +11783,7 @@ type AdminInitiateAuthOutput struct { // // All challenges require USERNAME and SECRET_HASH (if applicable). // - // The value of the USER_IF_FOR_SRP attribute will be the user's actual username, + // The value of the USER_ID_FOR_SRP attribute will be the user's actual username, // not an alias (such as email address or phone number), even if you specified // an alias in your call to AdminInitiateAuth. This is because, in the AdminRespondToAuthChallenge // API ChallengeResponses, the USERNAME attribute cannot be an alias. @@ -12099,7 +12189,7 @@ type AdminListUserAuthEventsInput struct { // UserPoolId is a required field UserPoolId *string `min:"1" type:"string" required:"true"` - // The user pool username. + // The user pool username or an alias. // // Username is a required field Username *string `min:"1" type:"string" required:"true"` @@ -12573,7 +12663,7 @@ type AdminSetUserMFAPreferenceInput struct { // UserPoolId is a required field UserPoolId *string `min:"1" type:"string" required:"true"` - // The user pool username. + // The user pool username or alias. // // Username is a required field Username *string `min:"1" type:"string" required:"true"` @@ -15055,6 +15145,15 @@ type CreateUserPoolInput struct { EmailVerificationSubject *string `min:"1" type:"string"` // The Lambda trigger configuration information for the new user pool. + // + // In a push model, event sources (such as Amazon S3 and custom applications) + // need permission to invoke a function. So you will need to make an extra call + // to add permission for these event sources to invoke your Lambda function. + // + // For more information on using the Lambda API to add permission, see AddPermission + // (https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html). + // + // For adding permission using the AWS CLI, see add-permission (https://docs.aws.amazon.com/cli/latest/reference/lambda/add-permission.html). LambdaConfig *LambdaConfigType `type:"structure"` // Specifies MFA configuration details. @@ -17299,6 +17398,72 @@ func (s *GetIdentityProviderByIdentifierOutput) SetIdentityProvider(v *IdentityP return s } +// Request to get a signing certificate from Cognito. +type GetSigningCertificateInput struct { + _ struct{} `type:"structure"` + + // The user pool ID. + // + // UserPoolId is a required field + UserPoolId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSigningCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSigningCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSigningCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSigningCertificateInput"} + if s.UserPoolId == nil { + invalidParams.Add(request.NewErrParamRequired("UserPoolId")) + } + if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetUserPoolId sets the UserPoolId field's value. +func (s *GetSigningCertificateInput) SetUserPoolId(v string) *GetSigningCertificateInput { + s.UserPoolId = &v + return s +} + +// Response from Cognito for a signing certificate request. +type GetSigningCertificateOutput struct { + _ struct{} `type:"structure"` + + // The signing certificate. + Certificate *string `type:"string"` +} + +// String returns the string representation +func (s GetSigningCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSigningCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificate sets the Certificate field's value. +func (s *GetSigningCertificateOutput) SetCertificate(v string) *GetSigningCertificateOutput { + s.Certificate = &v + return s +} + type GetUICustomizationInput struct { _ struct{} `type:"structure"` @@ -17934,6 +18099,9 @@ type InitiateAuthInput struct { // * USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables // to be used for next challenge execution. // + // * USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the + // next challenge or tokens. + // // Valid values include: // // * USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) @@ -17944,6 +18112,11 @@ type InitiateAuthInput struct { // // * CUSTOM_AUTH: Custom authentication flow. // + // * USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD + // are passed directly. If a user migration Lambda trigger is set, this flow + // will invoke the user migration Lambda if the USERNAME is not found in + // the user pool. + // // ADMIN_NO_SRP_AUTH is not a valid value. // // AuthFlow is a required field @@ -17955,9 +18128,8 @@ type InitiateAuthInput struct { // * For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH // (required if the app client is configured with a client secret), DEVICE_KEY // - // * For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: USERNAME (required), SECRET_HASH - // (required if the app client is configured with a client secret), REFRESH_TOKEN - // (required), DEVICE_KEY + // * For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH + // (required if the app client is configured with a client secret), DEVICE_KEY // // * For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is // configured with client secret), DEVICE_KEY @@ -18160,6 +18332,9 @@ type LambdaConfigType struct { // A Lambda trigger that is invoked before token generation. PreTokenGeneration *string `min:"20" type:"string"` + // The user migration Lambda config type. + UserMigration *string `min:"20" type:"string"` + // Verifies the authentication challenge response. VerifyAuthChallengeResponse *string `min:"20" type:"string"` } @@ -18201,6 +18376,9 @@ func (s *LambdaConfigType) Validate() error { if s.PreTokenGeneration != nil && len(*s.PreTokenGeneration) < 20 { invalidParams.Add(request.NewErrParamMinLen("PreTokenGeneration", 20)) } + if s.UserMigration != nil && len(*s.UserMigration) < 20 { + invalidParams.Add(request.NewErrParamMinLen("UserMigration", 20)) + } if s.VerifyAuthChallengeResponse != nil && len(*s.VerifyAuthChallengeResponse) < 20 { invalidParams.Add(request.NewErrParamMinLen("VerifyAuthChallengeResponse", 20)) } @@ -18259,6 +18437,12 @@ func (s *LambdaConfigType) SetPreTokenGeneration(v string) *LambdaConfigType { return s } +// SetUserMigration sets the UserMigration field's value. +func (s *LambdaConfigType) SetUserMigration(v string) *LambdaConfigType { + s.UserMigration = &v + return s +} + // SetVerifyAuthChallengeResponse sets the VerifyAuthChallengeResponse field's value. func (s *LambdaConfigType) SetVerifyAuthChallengeResponse(v string) *LambdaConfigType { s.VerifyAuthChallengeResponse = &v @@ -23881,6 +24065,9 @@ const ( // AuthFlowTypeAdminNoSrpAuth is a AuthFlowType enum value AuthFlowTypeAdminNoSrpAuth = "ADMIN_NO_SRP_AUTH" + + // AuthFlowTypeUserPasswordAuth is a AuthFlowType enum value + AuthFlowTypeUserPasswordAuth = "USER_PASSWORD_AUTH" ) const ( @@ -24016,6 +24203,9 @@ const ( // ExplicitAuthFlowsTypeCustomAuthFlowOnly is a ExplicitAuthFlowsType enum value ExplicitAuthFlowsTypeCustomAuthFlowOnly = "CUSTOM_AUTH_FLOW_ONLY" + + // ExplicitAuthFlowsTypeUserPasswordAuth is a ExplicitAuthFlowsType enum value + ExplicitAuthFlowsTypeUserPasswordAuth = "USER_PASSWORD_AUTH" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go new file mode 100644 index 000000000000..99c044f7a5c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go @@ -0,0 +1,4621 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package dax + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCreateCluster = "CreateCluster" + +// CreateClusterRequest generates a "aws/request.Request" representing the +// client's request for the CreateCluster operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCluster for more information on using the CreateCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateClusterRequest method. +// req, resp := client.CreateClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateCluster +func (c *DAX) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { + op := &request.Operation{ + Name: opCreateCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateClusterInput{} + } + + output = &CreateClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCluster API operation for Amazon DynamoDB Accelerator (DAX). +// +// Creates a DAX cluster. All nodes in the cluster run the same DAX caching +// software. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation CreateCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterAlreadyExistsFault "ClusterAlreadyExistsFault" +// You already have a DAX cluster with the given identifier. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacityFault" +// There are not enough system resources to create the cluster you requested +// (or to resize an already-existing cluster). +// +// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" +// The requested subnet group name does not refer to an existing subnet group. +// +// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" +// One or more parameters in a parameter group are in an invalid state. +// +// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" +// The specified parameter group does not exist. +// +// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceededFault" +// You have attempted to exceed the maximum number of DAX clusters for your +// AWS account. +// +// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceededFault" +// You have attempted to exceed the maximum number of nodes for a DAX cluster. +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceededFault" +// You have attempted to exceed the maximum number of nodes for your AWS account. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" +// You have exceeded the maximum number of tags for this DAX cluster. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateCluster +func (c *DAX) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + return out, req.Send() +} + +// CreateClusterWithContext is the same as CreateCluster with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateParameterGroup = "CreateParameterGroup" + +// CreateParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateParameterGroup operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateParameterGroup for more information on using the CreateParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateParameterGroupRequest method. +// req, resp := client.CreateParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateParameterGroup +func (c *DAX) CreateParameterGroupRequest(input *CreateParameterGroupInput) (req *request.Request, output *CreateParameterGroupOutput) { + op := &request.Operation{ + Name: opCreateParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateParameterGroupInput{} + } + + output = &CreateParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateParameterGroup API operation for Amazon DynamoDB Accelerator (DAX). +// +// Creates a new parameter group. A parameter group is a collection of parameters +// that you apply to all of the nodes in a DAX cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation CreateParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeParameterGroupQuotaExceededFault "ParameterGroupQuotaExceededFault" +// You have attempted to exceed the maximum number of parameter groups. +// +// * ErrCodeParameterGroupAlreadyExistsFault "ParameterGroupAlreadyExistsFault" +// The specified parameter group already exists. +// +// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" +// One or more parameters in a parameter group are in an invalid state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateParameterGroup +func (c *DAX) CreateParameterGroup(input *CreateParameterGroupInput) (*CreateParameterGroupOutput, error) { + req, out := c.CreateParameterGroupRequest(input) + return out, req.Send() +} + +// CreateParameterGroupWithContext is the same as CreateParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) CreateParameterGroupWithContext(ctx aws.Context, input *CreateParameterGroupInput, opts ...request.Option) (*CreateParameterGroupOutput, error) { + req, out := c.CreateParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSubnetGroup = "CreateSubnetGroup" + +// CreateSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSubnetGroup for more information on using the CreateSubnetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSubnetGroupRequest method. +// req, resp := client.CreateSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateSubnetGroup +func (c *DAX) CreateSubnetGroupRequest(input *CreateSubnetGroupInput) (req *request.Request, output *CreateSubnetGroupOutput) { + op := &request.Operation{ + Name: opCreateSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSubnetGroupInput{} + } + + output = &CreateSubnetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSubnetGroup API operation for Amazon DynamoDB Accelerator (DAX). +// +// Creates a new subnet group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation CreateSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubnetGroupAlreadyExistsFault "SubnetGroupAlreadyExistsFault" +// The specified subnet group already exists. +// +// * ErrCodeSubnetGroupQuotaExceededFault "SubnetGroupQuotaExceededFault" +// The request cannot be processed because it would exceed the allowed number +// of subnets in a subnet group. +// +// * ErrCodeSubnetQuotaExceededFault "SubnetQuotaExceededFault" +// The request cannot be processed because it would exceed the allowed number +// of subnets in a subnet group. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// An invalid subnet identifier was specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateSubnetGroup +func (c *DAX) CreateSubnetGroup(input *CreateSubnetGroupInput) (*CreateSubnetGroupOutput, error) { + req, out := c.CreateSubnetGroupRequest(input) + return out, req.Send() +} + +// CreateSubnetGroupWithContext is the same as CreateSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSubnetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) CreateSubnetGroupWithContext(ctx aws.Context, input *CreateSubnetGroupInput, opts ...request.Option) (*CreateSubnetGroupOutput, error) { + req, out := c.CreateSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDecreaseReplicationFactor = "DecreaseReplicationFactor" + +// DecreaseReplicationFactorRequest generates a "aws/request.Request" representing the +// client's request for the DecreaseReplicationFactor operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DecreaseReplicationFactor for more information on using the DecreaseReplicationFactor +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DecreaseReplicationFactorRequest method. +// req, resp := client.DecreaseReplicationFactorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DecreaseReplicationFactor +func (c *DAX) DecreaseReplicationFactorRequest(input *DecreaseReplicationFactorInput) (req *request.Request, output *DecreaseReplicationFactorOutput) { + op := &request.Operation{ + Name: opDecreaseReplicationFactor, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DecreaseReplicationFactorInput{} + } + + output = &DecreaseReplicationFactorOutput{} + req = c.newRequest(op, input, output) + return +} + +// DecreaseReplicationFactor API operation for Amazon DynamoDB Accelerator (DAX). +// +// Removes one or more nodes from a DAX cluster. +// +// You cannot use DecreaseReplicationFactor to remove the last node in a DAX +// cluster. If you need to do this, use DeleteCluster instead. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DecreaseReplicationFactor for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeNodeNotFoundFault "NodeNotFoundFault" +// None of the nodes in the cluster have the given node ID. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DecreaseReplicationFactor +func (c *DAX) DecreaseReplicationFactor(input *DecreaseReplicationFactorInput) (*DecreaseReplicationFactorOutput, error) { + req, out := c.DecreaseReplicationFactorRequest(input) + return out, req.Send() +} + +// DecreaseReplicationFactorWithContext is the same as DecreaseReplicationFactor with the addition of +// the ability to pass a context and additional request options. +// +// See DecreaseReplicationFactor for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DecreaseReplicationFactorWithContext(ctx aws.Context, input *DecreaseReplicationFactorInput, opts ...request.Option) (*DecreaseReplicationFactorOutput, error) { + req, out := c.DecreaseReplicationFactorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCluster = "DeleteCluster" + +// DeleteClusterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCluster operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCluster for more information on using the DeleteCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteClusterRequest method. +// req, resp := client.DeleteClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteCluster +func (c *DAX) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { + op := &request.Operation{ + Name: opDeleteCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteClusterInput{} + } + + output = &DeleteClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteCluster API operation for Amazon DynamoDB Accelerator (DAX). +// +// Deletes a previously provisioned DAX cluster. DeleteCluster deletes all associated +// nodes, node endpoints and the DAX cluster itself. When you receive a successful +// response from this action, DAX immediately begins deleting the cluster; you +// cannot cancel or revert this action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DeleteCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteCluster +func (c *DAX) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + return out, req.Send() +} + +// DeleteClusterWithContext is the same as DeleteCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteParameterGroup = "DeleteParameterGroup" + +// DeleteParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteParameterGroup operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteParameterGroup for more information on using the DeleteParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteParameterGroupRequest method. +// req, resp := client.DeleteParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteParameterGroup +func (c *DAX) DeleteParameterGroupRequest(input *DeleteParameterGroupInput) (req *request.Request, output *DeleteParameterGroupOutput) { + op := &request.Operation{ + Name: opDeleteParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteParameterGroupInput{} + } + + output = &DeleteParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteParameterGroup API operation for Amazon DynamoDB Accelerator (DAX). +// +// Deletes the specified parameter group. You cannot delete a parameter group +// if it is associated with any DAX clusters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DeleteParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" +// One or more parameters in a parameter group are in an invalid state. +// +// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" +// The specified parameter group does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteParameterGroup +func (c *DAX) DeleteParameterGroup(input *DeleteParameterGroupInput) (*DeleteParameterGroupOutput, error) { + req, out := c.DeleteParameterGroupRequest(input) + return out, req.Send() +} + +// DeleteParameterGroupWithContext is the same as DeleteParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DeleteParameterGroupWithContext(ctx aws.Context, input *DeleteParameterGroupInput, opts ...request.Option) (*DeleteParameterGroupOutput, error) { + req, out := c.DeleteParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSubnetGroup = "DeleteSubnetGroup" + +// DeleteSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSubnetGroup for more information on using the DeleteSubnetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSubnetGroupRequest method. +// req, resp := client.DeleteSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteSubnetGroup +func (c *DAX) DeleteSubnetGroupRequest(input *DeleteSubnetGroupInput) (req *request.Request, output *DeleteSubnetGroupOutput) { + op := &request.Operation{ + Name: opDeleteSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSubnetGroupInput{} + } + + output = &DeleteSubnetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSubnetGroup API operation for Amazon DynamoDB Accelerator (DAX). +// +// Deletes a subnet group. +// +// You cannot delete a subnet group if it is associated with any DAX clusters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DeleteSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubnetGroupInUseFault "SubnetGroupInUseFault" +// The specified subnet group is currently in use. +// +// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" +// The requested subnet group name does not refer to an existing subnet group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DeleteSubnetGroup +func (c *DAX) DeleteSubnetGroup(input *DeleteSubnetGroupInput) (*DeleteSubnetGroupOutput, error) { + req, out := c.DeleteSubnetGroupRequest(input) + return out, req.Send() +} + +// DeleteSubnetGroupWithContext is the same as DeleteSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSubnetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DeleteSubnetGroupWithContext(ctx aws.Context, input *DeleteSubnetGroupInput, opts ...request.Option) (*DeleteSubnetGroupOutput, error) { + req, out := c.DeleteSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClusters = "DescribeClusters" + +// DescribeClustersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClusters operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClusters for more information on using the DescribeClusters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClustersRequest method. +// req, resp := client.DescribeClustersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeClusters +func (c *DAX) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { + op := &request.Operation{ + Name: opDescribeClusters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClustersInput{} + } + + output = &DescribeClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClusters API operation for Amazon DynamoDB Accelerator (DAX). +// +// Returns information about all provisioned DAX clusters if no cluster identifier +// is specified, or about a specific DAX cluster if a cluster identifier is +// supplied. +// +// If the cluster is in the CREATING state, only cluster level information will +// be displayed until all of the nodes are successfully provisioned. +// +// If the cluster is in the DELETING state, only cluster level information will +// be displayed. +// +// If nodes are currently being added to the DAX cluster, node endpoint information +// and creation time for the additional nodes will not be displayed until they +// are completely provisioned. When the DAX cluster state is available, the +// cluster is ready for use. +// +// If nodes are currently being removed from the DAX cluster, no endpoint information +// for the removed nodes is displayed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DescribeClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeClusters +func (c *DAX) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { + req, out := c.DescribeClustersRequest(input) + return out, req.Send() +} + +// DescribeClustersWithContext is the same as DescribeClusters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClusters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { + req, out := c.DescribeClustersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDefaultParameters = "DescribeDefaultParameters" + +// DescribeDefaultParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDefaultParameters operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDefaultParameters for more information on using the DescribeDefaultParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDefaultParametersRequest method. +// req, resp := client.DescribeDefaultParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeDefaultParameters +func (c *DAX) DescribeDefaultParametersRequest(input *DescribeDefaultParametersInput) (req *request.Request, output *DescribeDefaultParametersOutput) { + op := &request.Operation{ + Name: opDescribeDefaultParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDefaultParametersInput{} + } + + output = &DescribeDefaultParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDefaultParameters API operation for Amazon DynamoDB Accelerator (DAX). +// +// Returns the default system parameter information for the DAX caching software. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DescribeDefaultParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeDefaultParameters +func (c *DAX) DescribeDefaultParameters(input *DescribeDefaultParametersInput) (*DescribeDefaultParametersOutput, error) { + req, out := c.DescribeDefaultParametersRequest(input) + return out, req.Send() +} + +// DescribeDefaultParametersWithContext is the same as DescribeDefaultParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDefaultParameters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DescribeDefaultParametersWithContext(ctx aws.Context, input *DescribeDefaultParametersInput, opts ...request.Option) (*DescribeDefaultParametersOutput, error) { + req, out := c.DescribeDefaultParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEvents = "DescribeEvents" + +// DescribeEventsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEvents operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEvents for more information on using the DescribeEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEventsRequest method. +// req, resp := client.DescribeEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeEvents +func (c *DAX) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { + op := &request.Operation{ + Name: opDescribeEvents, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEventsInput{} + } + + output = &DescribeEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEvents API operation for Amazon DynamoDB Accelerator (DAX). +// +// Returns events related to DAX clusters and parameter groups. You can obtain +// events specific to a particular DAX cluster or parameter group by providing +// the name as a parameter. +// +// By default, only the events occurring within the last hour are returned; +// however, you can retrieve up to 14 days' worth of events if necessary. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DescribeEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeEvents +func (c *DAX) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { + req, out := c.DescribeEventsRequest(input) + return out, req.Send() +} + +// DescribeEventsWithContext is the same as DescribeEvents with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { + req, out := c.DescribeEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeParameterGroups = "DescribeParameterGroups" + +// DescribeParameterGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeParameterGroups operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeParameterGroups for more information on using the DescribeParameterGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeParameterGroupsRequest method. +// req, resp := client.DescribeParameterGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameterGroups +func (c *DAX) DescribeParameterGroupsRequest(input *DescribeParameterGroupsInput) (req *request.Request, output *DescribeParameterGroupsOutput) { + op := &request.Operation{ + Name: opDescribeParameterGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeParameterGroupsInput{} + } + + output = &DescribeParameterGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeParameterGroups API operation for Amazon DynamoDB Accelerator (DAX). +// +// Returns a list of parameter group descriptions. If a parameter group name +// is specified, the list will contain only the descriptions for that group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DescribeParameterGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" +// The specified parameter group does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameterGroups +func (c *DAX) DescribeParameterGroups(input *DescribeParameterGroupsInput) (*DescribeParameterGroupsOutput, error) { + req, out := c.DescribeParameterGroupsRequest(input) + return out, req.Send() +} + +// DescribeParameterGroupsWithContext is the same as DescribeParameterGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeParameterGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DescribeParameterGroupsWithContext(ctx aws.Context, input *DescribeParameterGroupsInput, opts ...request.Option) (*DescribeParameterGroupsOutput, error) { + req, out := c.DescribeParameterGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeParameters = "DescribeParameters" + +// DescribeParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeParameters operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeParameters for more information on using the DescribeParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeParametersRequest method. +// req, resp := client.DescribeParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameters +func (c *DAX) DescribeParametersRequest(input *DescribeParametersInput) (req *request.Request, output *DescribeParametersOutput) { + op := &request.Operation{ + Name: opDescribeParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeParametersInput{} + } + + output = &DescribeParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeParameters API operation for Amazon DynamoDB Accelerator (DAX). +// +// Returns the detailed parameter list for a particular parameter group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DescribeParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" +// The specified parameter group does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeParameters +func (c *DAX) DescribeParameters(input *DescribeParametersInput) (*DescribeParametersOutput, error) { + req, out := c.DescribeParametersRequest(input) + return out, req.Send() +} + +// DescribeParametersWithContext is the same as DescribeParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeParameters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DescribeParametersWithContext(ctx aws.Context, input *DescribeParametersInput, opts ...request.Option) (*DescribeParametersOutput, error) { + req, out := c.DescribeParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSubnetGroups = "DescribeSubnetGroups" + +// DescribeSubnetGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSubnetGroups operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSubnetGroups for more information on using the DescribeSubnetGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSubnetGroupsRequest method. +// req, resp := client.DescribeSubnetGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeSubnetGroups +func (c *DAX) DescribeSubnetGroupsRequest(input *DescribeSubnetGroupsInput) (req *request.Request, output *DescribeSubnetGroupsOutput) { + op := &request.Operation{ + Name: opDescribeSubnetGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSubnetGroupsInput{} + } + + output = &DescribeSubnetGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSubnetGroups API operation for Amazon DynamoDB Accelerator (DAX). +// +// Returns a list of subnet group descriptions. If a subnet group name is specified, +// the list will contain only the description of that group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation DescribeSubnetGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" +// The requested subnet group name does not refer to an existing subnet group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/DescribeSubnetGroups +func (c *DAX) DescribeSubnetGroups(input *DescribeSubnetGroupsInput) (*DescribeSubnetGroupsOutput, error) { + req, out := c.DescribeSubnetGroupsRequest(input) + return out, req.Send() +} + +// DescribeSubnetGroupsWithContext is the same as DescribeSubnetGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSubnetGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) DescribeSubnetGroupsWithContext(ctx aws.Context, input *DescribeSubnetGroupsInput, opts ...request.Option) (*DescribeSubnetGroupsOutput, error) { + req, out := c.DescribeSubnetGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opIncreaseReplicationFactor = "IncreaseReplicationFactor" + +// IncreaseReplicationFactorRequest generates a "aws/request.Request" representing the +// client's request for the IncreaseReplicationFactor operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See IncreaseReplicationFactor for more information on using the IncreaseReplicationFactor +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the IncreaseReplicationFactorRequest method. +// req, resp := client.IncreaseReplicationFactorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/IncreaseReplicationFactor +func (c *DAX) IncreaseReplicationFactorRequest(input *IncreaseReplicationFactorInput) (req *request.Request, output *IncreaseReplicationFactorOutput) { + op := &request.Operation{ + Name: opIncreaseReplicationFactor, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IncreaseReplicationFactorInput{} + } + + output = &IncreaseReplicationFactorOutput{} + req = c.newRequest(op, input, output) + return +} + +// IncreaseReplicationFactor API operation for Amazon DynamoDB Accelerator (DAX). +// +// Adds one or more nodes to a DAX cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation IncreaseReplicationFactor for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInsufficientClusterCapacityFault "InsufficientClusterCapacityFault" +// There are not enough system resources to create the cluster you requested +// (or to resize an already-existing cluster). +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceededFault" +// You have attempted to exceed the maximum number of nodes for a DAX cluster. +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceededFault" +// You have attempted to exceed the maximum number of nodes for your AWS account. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/IncreaseReplicationFactor +func (c *DAX) IncreaseReplicationFactor(input *IncreaseReplicationFactorInput) (*IncreaseReplicationFactorOutput, error) { + req, out := c.IncreaseReplicationFactorRequest(input) + return out, req.Send() +} + +// IncreaseReplicationFactorWithContext is the same as IncreaseReplicationFactor with the addition of +// the ability to pass a context and additional request options. +// +// See IncreaseReplicationFactor for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) IncreaseReplicationFactorWithContext(ctx aws.Context, input *IncreaseReplicationFactorInput, opts ...request.Option) (*IncreaseReplicationFactorOutput, error) { + req, out := c.IncreaseReplicationFactorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTags = "ListTags" + +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTags for more information on using the ListTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/ListTags +func (c *DAX) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for Amazon DynamoDB Accelerator (DAX). +// +// List all of the tags for a DAX cluster. You can call ListTags up to 10 times +// per second, per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation ListTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeInvalidARNFault "InvalidARNFault" +// The Amazon Resource Name (ARN) supplied in the request is not valid. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/ListTags +func (c *DAX) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + return out, req.Send() +} + +// ListTagsWithContext is the same as ListTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootNode = "RebootNode" + +// RebootNodeRequest generates a "aws/request.Request" representing the +// client's request for the RebootNode operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RebootNode for more information on using the RebootNode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RebootNodeRequest method. +// req, resp := client.RebootNodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/RebootNode +func (c *DAX) RebootNodeRequest(input *RebootNodeInput) (req *request.Request, output *RebootNodeOutput) { + op := &request.Operation{ + Name: opRebootNode, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootNodeInput{} + } + + output = &RebootNodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootNode API operation for Amazon DynamoDB Accelerator (DAX). +// +// Reboots a single node of a DAX cluster. The reboot action takes place as +// soon as possible. During the reboot, the node status is set to REBOOTING. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation RebootNode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeNodeNotFoundFault "NodeNotFoundFault" +// None of the nodes in the cluster have the given node ID. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/RebootNode +func (c *DAX) RebootNode(input *RebootNodeInput) (*RebootNodeOutput, error) { + req, out := c.RebootNodeRequest(input) + return out, req.Send() +} + +// RebootNodeWithContext is the same as RebootNode with the addition of +// the ability to pass a context and additional request options. +// +// See RebootNode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) RebootNodeWithContext(ctx aws.Context, input *RebootNodeInput, opts ...request.Option) (*RebootNodeOutput, error) { + req, out := c.RebootNodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/TagResource +func (c *DAX) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// TagResource API operation for Amazon DynamoDB Accelerator (DAX). +// +// Associates a set of tags with a DAX resource. You can call TagResource up +// to 5 times per second, per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" +// You have exceeded the maximum number of tags for this DAX cluster. +// +// * ErrCodeInvalidARNFault "InvalidARNFault" +// The Amazon Resource Name (ARN) supplied in the request is not valid. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/TagResource +func (c *DAX) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UntagResource +func (c *DAX) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UntagResource API operation for Amazon DynamoDB Accelerator (DAX). +// +// Removes the association of tags from a DAX resource. You can call UntagResource +// up to 5 times per second, per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeInvalidARNFault "InvalidARNFault" +// The Amazon Resource Name (ARN) supplied in the request is not valid. +// +// * ErrCodeTagNotFoundFault "TagNotFoundFault" +// The tag does not exist. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UntagResource +func (c *DAX) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCluster = "UpdateCluster" + +// UpdateClusterRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCluster operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCluster for more information on using the UpdateCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateClusterRequest method. +// req, resp := client.UpdateClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateCluster +func (c *DAX) UpdateClusterRequest(input *UpdateClusterInput) (req *request.Request, output *UpdateClusterOutput) { + op := &request.Operation{ + Name: opUpdateCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateClusterInput{} + } + + output = &UpdateClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateCluster API operation for Amazon DynamoDB Accelerator (DAX). +// +// Modifies the settings for a DAX cluster. You can use this action to change +// one or more cluster configuration parameters by specifying the parameters +// and the new values. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation UpdateCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidClusterStateFault "InvalidClusterStateFault" +// The requested DAX cluster is not in the available state. +// +// * ErrCodeClusterNotFoundFault "ClusterNotFoundFault" +// The requested cluster ID does not refer to an existing DAX cluster. +// +// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" +// One or more parameters in a parameter group are in an invalid state. +// +// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" +// The specified parameter group does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateCluster +func (c *DAX) UpdateCluster(input *UpdateClusterInput) (*UpdateClusterOutput, error) { + req, out := c.UpdateClusterRequest(input) + return out, req.Send() +} + +// UpdateClusterWithContext is the same as UpdateCluster with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) UpdateClusterWithContext(ctx aws.Context, input *UpdateClusterInput, opts ...request.Option) (*UpdateClusterOutput, error) { + req, out := c.UpdateClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateParameterGroup = "UpdateParameterGroup" + +// UpdateParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateParameterGroup operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateParameterGroup for more information on using the UpdateParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateParameterGroupRequest method. +// req, resp := client.UpdateParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateParameterGroup +func (c *DAX) UpdateParameterGroupRequest(input *UpdateParameterGroupInput) (req *request.Request, output *UpdateParameterGroupOutput) { + op := &request.Operation{ + Name: opUpdateParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateParameterGroupInput{} + } + + output = &UpdateParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateParameterGroup API operation for Amazon DynamoDB Accelerator (DAX). +// +// Modifies the parameters of a parameter group. You can modify up to 20 parameters +// in a single request by submitting a list parameter name and value pairs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation UpdateParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterGroupStateFault "InvalidParameterGroupStateFault" +// One or more parameters in a parameter group are in an invalid state. +// +// * ErrCodeParameterGroupNotFoundFault "ParameterGroupNotFoundFault" +// The specified parameter group does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateParameterGroup +func (c *DAX) UpdateParameterGroup(input *UpdateParameterGroupInput) (*UpdateParameterGroupOutput, error) { + req, out := c.UpdateParameterGroupRequest(input) + return out, req.Send() +} + +// UpdateParameterGroupWithContext is the same as UpdateParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) UpdateParameterGroupWithContext(ctx aws.Context, input *UpdateParameterGroupInput, opts ...request.Option) (*UpdateParameterGroupOutput, error) { + req, out := c.UpdateParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSubnetGroup = "UpdateSubnetGroup" + +// UpdateSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSubnetGroup for more information on using the UpdateSubnetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSubnetGroupRequest method. +// req, resp := client.UpdateSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateSubnetGroup +func (c *DAX) UpdateSubnetGroupRequest(input *UpdateSubnetGroupInput) (req *request.Request, output *UpdateSubnetGroupOutput) { + op := &request.Operation{ + Name: opUpdateSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSubnetGroupInput{} + } + + output = &UpdateSubnetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSubnetGroup API operation for Amazon DynamoDB Accelerator (DAX). +// +// Modifies an existing subnet group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB Accelerator (DAX)'s +// API operation UpdateSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubnetGroupNotFoundFault "SubnetGroupNotFoundFault" +// The requested subnet group name does not refer to an existing subnet group. +// +// * ErrCodeSubnetQuotaExceededFault "SubnetQuotaExceededFault" +// The request cannot be processed because it would exceed the allowed number +// of subnets in a subnet group. +// +// * ErrCodeSubnetInUse "SubnetInUse" +// The requested subnet is being used by another subnet group. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// An invalid subnet identifier was specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateSubnetGroup +func (c *DAX) UpdateSubnetGroup(input *UpdateSubnetGroupInput) (*UpdateSubnetGroupOutput, error) { + req, out := c.UpdateSubnetGroupRequest(input) + return out, req.Send() +} + +// UpdateSubnetGroupWithContext is the same as UpdateSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSubnetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DAX) UpdateSubnetGroupWithContext(ctx aws.Context, input *UpdateSubnetGroupInput, opts ...request.Option) (*UpdateSubnetGroupOutput, error) { + req, out := c.UpdateSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Contains all of the attributes of a specific DAX cluster. +type Cluster struct { + _ struct{} `type:"structure"` + + // The number of nodes in the cluster that are active (i.e., capable of serving + // requests). + ActiveNodes *int64 `type:"integer"` + + // The Amazon Resource Name (ARN) that uniquely identifies the cluster. + ClusterArn *string `type:"string"` + + // The configuration endpoint for this DAX cluster, consisting of a DNS name + // and a port number. Client applications can specify this endpoint, rather + // than an individual node endpoint, and allow the DAX client software to intelligently + // route requests and responses to nodes in the DAX cluster. + ClusterDiscoveryEndpoint *Endpoint `type:"structure"` + + // The name of the DAX cluster. + ClusterName *string `type:"string"` + + // The description of the cluster. + Description *string `type:"string"` + + // A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, + // DAX will assume this role and use the role's permissions to access DynamoDB + // on your behalf. + IamRoleArn *string `type:"string"` + + // A list of nodes to be removed from the cluster. + NodeIdsToRemove []*string `type:"list"` + + // The node type for the nodes in the cluster. (All nodes in a DAX cluster are + // of the same type.) + NodeType *string `type:"string"` + + // A list of nodes that are currently in the cluster. + Nodes []*Node `type:"list"` + + // Describes a notification topic and its status. Notification topics are used + // for publishing DAX events to subscribers using Amazon Simple Notification + // Service (SNS). + NotificationConfiguration *NotificationConfiguration `type:"structure"` + + // The parameter group being used by nodes in the cluster. + ParameterGroup *ParameterGroupStatus `type:"structure"` + + // A range of time when maintenance of DAX cluster software will be performed. + // For example: sun:01:00-sun:09:00. Cluster maintenance normally takes less + // than 30 minutes, and is performed automatically within the maintenance window. + PreferredMaintenanceWindow *string `type:"string"` + + // A list of security groups, and the status of each, for the nodes in the cluster. + SecurityGroups []*SecurityGroupMembership `type:"list"` + + // The current status of the cluster. + Status *string `type:"string"` + + // The subnet group where the DAX cluster is running. + SubnetGroup *string `type:"string"` + + // The total number of nodes in the cluster. + TotalNodes *int64 `type:"integer"` +} + +// String returns the string representation +func (s Cluster) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Cluster) GoString() string { + return s.String() +} + +// SetActiveNodes sets the ActiveNodes field's value. +func (s *Cluster) SetActiveNodes(v int64) *Cluster { + s.ActiveNodes = &v + return s +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *Cluster) SetClusterArn(v string) *Cluster { + s.ClusterArn = &v + return s +} + +// SetClusterDiscoveryEndpoint sets the ClusterDiscoveryEndpoint field's value. +func (s *Cluster) SetClusterDiscoveryEndpoint(v *Endpoint) *Cluster { + s.ClusterDiscoveryEndpoint = v + return s +} + +// SetClusterName sets the ClusterName field's value. +func (s *Cluster) SetClusterName(v string) *Cluster { + s.ClusterName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Cluster) SetDescription(v string) *Cluster { + s.Description = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *Cluster) SetIamRoleArn(v string) *Cluster { + s.IamRoleArn = &v + return s +} + +// SetNodeIdsToRemove sets the NodeIdsToRemove field's value. +func (s *Cluster) SetNodeIdsToRemove(v []*string) *Cluster { + s.NodeIdsToRemove = v + return s +} + +// SetNodeType sets the NodeType field's value. +func (s *Cluster) SetNodeType(v string) *Cluster { + s.NodeType = &v + return s +} + +// SetNodes sets the Nodes field's value. +func (s *Cluster) SetNodes(v []*Node) *Cluster { + s.Nodes = v + return s +} + +// SetNotificationConfiguration sets the NotificationConfiguration field's value. +func (s *Cluster) SetNotificationConfiguration(v *NotificationConfiguration) *Cluster { + s.NotificationConfiguration = v + return s +} + +// SetParameterGroup sets the ParameterGroup field's value. +func (s *Cluster) SetParameterGroup(v *ParameterGroupStatus) *Cluster { + s.ParameterGroup = v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *Cluster) SetPreferredMaintenanceWindow(v string) *Cluster { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *Cluster) SetSecurityGroups(v []*SecurityGroupMembership) *Cluster { + s.SecurityGroups = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Cluster) SetStatus(v string) *Cluster { + s.Status = &v + return s +} + +// SetSubnetGroup sets the SubnetGroup field's value. +func (s *Cluster) SetSubnetGroup(v string) *Cluster { + s.SubnetGroup = &v + return s +} + +// SetTotalNodes sets the TotalNodes field's value. +func (s *Cluster) SetTotalNodes(v int64) *Cluster { + s.TotalNodes = &v + return s +} + +type CreateClusterInput struct { + _ struct{} `type:"structure"` + + // The Availability Zones (AZs) in which the cluster nodes will be created. + // All nodes belonging to the cluster are placed in these Availability Zones. + // Use this parameter if you want to distribute the nodes across multiple AZs. + AvailabilityZones []*string `type:"list"` + + // The cluster identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * A name must contain from 1 to 20 alphanumeric characters or hyphens. + // + // * The first character must be a letter. + // + // * A name cannot end with a hyphen or contain two consecutive hyphens. + // + // ClusterName is a required field + ClusterName *string `type:"string" required:"true"` + + // A description of the cluster. + Description *string `type:"string"` + + // A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, + // DAX will assume this role and use the role's permissions to access DynamoDB + // on your behalf. + // + // IamRoleArn is a required field + IamRoleArn *string `type:"string" required:"true"` + + // The compute and memory capacity of the nodes in the cluster. + // + // NodeType is a required field + NodeType *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications + // will be sent. + // + // The Amazon SNS topic owner must be same as the DAX cluster owner. + NotificationTopicArn *string `type:"string"` + + // The parameter group to be associated with the DAX cluster. + ParameterGroupName *string `type:"string"` + + // Specifies the weekly time range during which maintenance on the DAX cluster + // is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi + // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid + // values for ddd are: + // + // * sun + // + // * mon + // + // * tue + // + // * wed + // + // * thu + // + // * fri + // + // * sat + // + // Example: sun:05:00-sun:09:00 + // + // If you don't specify a preferred maintenance window when you create or modify + // a cache cluster, DAX assigns a 60-minute maintenance window on a randomly + // selected day of the week. + PreferredMaintenanceWindow *string `type:"string"` + + // The number of nodes in the DAX cluster. A replication factor of 1 will create + // a single-node cluster, without any read replicas. For additional fault tolerance, + // you can create a multiple node cluster with one or more read replicas. To + // do this, set ReplicationFactor to 2 or more. + // + // AWS recommends that you have at least two read replicas per cluster. + // + // ReplicationFactor is a required field + ReplicationFactor *int64 `type:"integer" required:"true"` + + // A list of security group IDs to be assigned to each node in the DAX cluster. + // (Each of the security group ID is system-generated.) + // + // If this parameter is not specified, DAX assigns the default VPC security + // group to each node. + SecurityGroupIds []*string `type:"list"` + + // The name of the subnet group to be used for the replication group. + // + // DAX clusters can only run in an Amazon VPC environment. All of the subnets + // that you specify in a subnet group must exist in the same VPC. + SubnetGroupName *string `type:"string"` + + // A set of tags to associate with the DAX cluster. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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.ClusterName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterName")) + } + if s.IamRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) + } + if s.NodeType == nil { + invalidParams.Add(request.NewErrParamRequired("NodeType")) + } + if s.ReplicationFactor == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationFactor")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *CreateClusterInput) SetAvailabilityZones(v []*string) *CreateClusterInput { + s.AvailabilityZones = v + return s +} + +// SetClusterName sets the ClusterName field's value. +func (s *CreateClusterInput) SetClusterName(v string) *CreateClusterInput { + s.ClusterName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateClusterInput) SetDescription(v string) *CreateClusterInput { + s.Description = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *CreateClusterInput) SetIamRoleArn(v string) *CreateClusterInput { + s.IamRoleArn = &v + return s +} + +// SetNodeType sets the NodeType field's value. +func (s *CreateClusterInput) SetNodeType(v string) *CreateClusterInput { + s.NodeType = &v + return s +} + +// SetNotificationTopicArn sets the NotificationTopicArn field's value. +func (s *CreateClusterInput) SetNotificationTopicArn(v string) *CreateClusterInput { + s.NotificationTopicArn = &v + return s +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *CreateClusterInput) SetParameterGroupName(v string) *CreateClusterInput { + s.ParameterGroupName = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateClusterInput) SetPreferredMaintenanceWindow(v string) *CreateClusterInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetReplicationFactor sets the ReplicationFactor field's value. +func (s *CreateClusterInput) SetReplicationFactor(v int64) *CreateClusterInput { + s.ReplicationFactor = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateClusterInput) SetSecurityGroupIds(v []*string) *CreateClusterInput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetGroupName sets the SubnetGroupName field's value. +func (s *CreateClusterInput) SetSubnetGroupName(v string) *CreateClusterInput { + s.SubnetGroupName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateClusterInput) SetTags(v []*Tag) *CreateClusterInput { + s.Tags = v + return s +} + +type CreateClusterOutput struct { + _ struct{} `type:"structure"` + + // A description of the DAX cluster that you have created. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s CreateClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { + s.Cluster = v + return s +} + +type CreateParameterGroupInput struct { + _ struct{} `type:"structure"` + + // A description of the parameter group. + Description *string `type:"string"` + + // The name of the parameter group to apply to all of the clusters in this replication + // group. + // + // ParameterGroupName is a required field + ParameterGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateParameterGroupInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateParameterGroupInput) SetDescription(v string) *CreateParameterGroupInput { + s.Description = &v + return s +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *CreateParameterGroupInput) SetParameterGroupName(v string) *CreateParameterGroupInput { + s.ParameterGroupName = &v + return s +} + +type CreateParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Represents the output of a CreateParameterGroup action. + ParameterGroup *ParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateParameterGroupOutput) GoString() string { + return s.String() +} + +// SetParameterGroup sets the ParameterGroup field's value. +func (s *CreateParameterGroupOutput) SetParameterGroup(v *ParameterGroup) *CreateParameterGroupOutput { + s.ParameterGroup = v + return s +} + +type CreateSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // A description for the subnet group + Description *string `type:"string"` + + // A name for the subnet group. This value is stored as a lowercase string. + // + // SubnetGroupName is a required field + SubnetGroupName *string `type:"string" required:"true"` + + // A list of VPC subnet IDs for the subnet group. + // + // SubnetIds is a required field + SubnetIds []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSubnetGroupInput"} + if s.SubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateSubnetGroupInput) SetDescription(v string) *CreateSubnetGroupInput { + s.Description = &v + return s +} + +// SetSubnetGroupName sets the SubnetGroupName field's value. +func (s *CreateSubnetGroupInput) SetSubnetGroupName(v string) *CreateSubnetGroupInput { + s.SubnetGroupName = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateSubnetGroupInput) SetSubnetIds(v []*string) *CreateSubnetGroupInput { + s.SubnetIds = v + return s +} + +type CreateSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // Represents the output of a CreateSubnetGroup operation. + SubnetGroup *SubnetGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubnetGroupOutput) GoString() string { + return s.String() +} + +// SetSubnetGroup sets the SubnetGroup field's value. +func (s *CreateSubnetGroupOutput) SetSubnetGroup(v *SubnetGroup) *CreateSubnetGroupOutput { + s.SubnetGroup = v + return s +} + +type DecreaseReplicationFactorInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone(s) from which to remove nodes. + AvailabilityZones []*string `type:"list"` + + // The name of the DAX cluster from which you want to remove nodes. + // + // ClusterName is a required field + ClusterName *string `type:"string" required:"true"` + + // The new number of nodes for the DAX cluster. + // + // NewReplicationFactor is a required field + NewReplicationFactor *int64 `type:"integer" required:"true"` + + // The unique identifiers of the nodes to be removed from the cluster. + NodeIdsToRemove []*string `type:"list"` +} + +// String returns the string representation +func (s DecreaseReplicationFactorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecreaseReplicationFactorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DecreaseReplicationFactorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecreaseReplicationFactorInput"} + if s.ClusterName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterName")) + } + if s.NewReplicationFactor == nil { + invalidParams.Add(request.NewErrParamRequired("NewReplicationFactor")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *DecreaseReplicationFactorInput) SetAvailabilityZones(v []*string) *DecreaseReplicationFactorInput { + s.AvailabilityZones = v + return s +} + +// SetClusterName sets the ClusterName field's value. +func (s *DecreaseReplicationFactorInput) SetClusterName(v string) *DecreaseReplicationFactorInput { + s.ClusterName = &v + return s +} + +// SetNewReplicationFactor sets the NewReplicationFactor field's value. +func (s *DecreaseReplicationFactorInput) SetNewReplicationFactor(v int64) *DecreaseReplicationFactorInput { + s.NewReplicationFactor = &v + return s +} + +// SetNodeIdsToRemove sets the NodeIdsToRemove field's value. +func (s *DecreaseReplicationFactorInput) SetNodeIdsToRemove(v []*string) *DecreaseReplicationFactorInput { + s.NodeIdsToRemove = v + return s +} + +type DecreaseReplicationFactorOutput struct { + _ struct{} `type:"structure"` + + // A description of the DAX cluster, after you have decreased its replication + // factor. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s DecreaseReplicationFactorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecreaseReplicationFactorOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *DecreaseReplicationFactorOutput) SetCluster(v *Cluster) *DecreaseReplicationFactorOutput { + s.Cluster = v + return s +} + +type DeleteClusterInput struct { + _ struct{} `type:"structure"` + + // The name of the cluster to be deleted. + // + // ClusterName is a required field + ClusterName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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.ClusterName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterName sets the ClusterName field's value. +func (s *DeleteClusterInput) SetClusterName(v string) *DeleteClusterInput { + s.ClusterName = &v + return s +} + +type DeleteClusterOutput struct { + _ struct{} `type:"structure"` + + // A description of the DAX cluster that is being deleted. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s DeleteClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { + s.Cluster = v + return s +} + +type DeleteParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the parameter group to delete. + // + // ParameterGroupName is a required field + ParameterGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteParameterGroupInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *DeleteParameterGroupInput) SetParameterGroupName(v string) *DeleteParameterGroupInput { + s.ParameterGroupName = &v + return s +} + +type DeleteParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // A user-specified message for this action (i.e., a reason for deleting the + // parameter group). + DeletionMessage *string `type:"string"` +} + +// String returns the string representation +func (s DeleteParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDeletionMessage sets the DeletionMessage field's value. +func (s *DeleteParameterGroupOutput) SetDeletionMessage(v string) *DeleteParameterGroupOutput { + s.DeletionMessage = &v + return s +} + +type DeleteSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the subnet group to delete. + // + // SubnetGroupName is a required field + SubnetGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubnetGroupInput"} + if s.SubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSubnetGroupName sets the SubnetGroupName field's value. +func (s *DeleteSubnetGroupInput) SetSubnetGroupName(v string) *DeleteSubnetGroupInput { + s.SubnetGroupName = &v + return s +} + +type DeleteSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // A user-specified message for this action (i.e., a reason for deleting the + // subnet group). + DeletionMessage *string `type:"string"` +} + +// String returns the string representation +func (s DeleteSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubnetGroupOutput) GoString() string { + return s.String() +} + +// SetDeletionMessage sets the DeletionMessage field's value. +func (s *DeleteSubnetGroupOutput) SetDeletionMessage(v string) *DeleteSubnetGroupOutput { + s.DeletionMessage = &v + return s +} + +type DescribeClustersInput struct { + _ struct{} `type:"structure"` + + // The names of the DAX clusters being described. + ClusterNames []*string `type:"list"` + + // The maximum number of results to include in the response. If more results + // exist than the specified MaxResults value, a token is included in the response + // so that the remaining results can be retrieved. + // + // The value for MaxResults must be between 20 and 100. + MaxResults *int64 `type:"integer"` + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClustersInput) GoString() string { + return s.String() +} + +// SetClusterNames sets the ClusterNames field's value. +func (s *DescribeClustersInput) SetClusterNames(v []*string) *DescribeClustersInput { + s.ClusterNames = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput { + s.NextToken = &v + return s +} + +type DescribeClustersOutput struct { + _ struct{} `type:"structure"` + + // The descriptions of your DAX clusters, in response to a DescribeClusters + // request. + Clusters []*Cluster `type:"list"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClustersOutput) GoString() string { + return s.String() +} + +// SetClusters sets the Clusters field's value. +func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { + s.Clusters = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput { + s.NextToken = &v + return s +} + +type DescribeDefaultParametersInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to include in the response. If more results + // exist than the specified MaxResults value, a token is included in the response + // so that the remaining results can be retrieved. + // + // The value for MaxResults must be between 20 and 100. + MaxResults *int64 `type:"integer"` + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDefaultParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDefaultParametersInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeDefaultParametersInput) SetMaxResults(v int64) *DescribeDefaultParametersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDefaultParametersInput) SetNextToken(v string) *DescribeDefaultParametersInput { + s.NextToken = &v + return s +} + +type DescribeDefaultParametersOutput struct { + _ struct{} `type:"structure"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // A list of parameters. Each element in the list represents one parameter. + Parameters []*Parameter `type:"list"` +} + +// String returns the string representation +func (s DescribeDefaultParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDefaultParametersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDefaultParametersOutput) SetNextToken(v string) *DescribeDefaultParametersOutput { + s.NextToken = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *DescribeDefaultParametersOutput) SetParameters(v []*Parameter) *DescribeDefaultParametersOutput { + s.Parameters = v + return s +} + +type DescribeEventsInput struct { + _ struct{} `type:"structure"` + + // The number of minutes' worth of events to retrieve. + Duration *int64 `type:"integer"` + + // The end of the time interval for which to retrieve events, specified in ISO + // 8601 format. + EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The maximum number of results to include in the response. If more results + // exist than the specified MaxResults value, a token is included in the response + // so that the remaining results can be retrieved. + // + // The value for MaxResults must be between 20 and 100. + MaxResults *int64 `type:"integer"` + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string `type:"string"` + + // The identifier of the event source for which events will be returned. If + // not specified, then all sources are included in the response. + SourceName *string `type:"string"` + + // The event source to retrieve events for. If no value is specified, all events + // are returned. + SourceType *string `type:"string" enum:"SourceType"` + + // The beginning of the time interval to retrieve events for, specified in ISO + // 8601 format. + StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s DescribeEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventsInput) GoString() string { + return s.String() +} + +// SetDuration sets the Duration field's value. +func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { + s.Duration = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { + s.EndTime = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeEventsInput) SetMaxResults(v int64) *DescribeEventsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput { + s.NextToken = &v + return s +} + +// SetSourceName sets the SourceName field's value. +func (s *DescribeEventsInput) SetSourceName(v string) *DescribeEventsInput { + s.SourceName = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { + s.SourceType = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { + s.StartTime = &v + return s +} + +type DescribeEventsOutput struct { + _ struct{} `type:"structure"` + + // An array of events. Each element in the array represents one event. + Events []*Event `type:"list"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventsOutput) GoString() string { + return s.String() +} + +// SetEvents sets the Events field's value. +func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { + s.Events = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput { + s.NextToken = &v + return s +} + +type DescribeParameterGroupsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to include in the response. If more results + // exist than the specified MaxResults value, a token is included in the response + // so that the remaining results can be retrieved. + // + // The value for MaxResults must be between 20 and 100. + MaxResults *int64 `type:"integer"` + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string `type:"string"` + + // The names of the parameter groups. + ParameterGroupNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeParameterGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeParameterGroupsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeParameterGroupsInput) SetMaxResults(v int64) *DescribeParameterGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeParameterGroupsInput) SetNextToken(v string) *DescribeParameterGroupsInput { + s.NextToken = &v + return s +} + +// SetParameterGroupNames sets the ParameterGroupNames field's value. +func (s *DescribeParameterGroupsInput) SetParameterGroupNames(v []*string) *DescribeParameterGroupsInput { + s.ParameterGroupNames = v + return s +} + +type DescribeParameterGroupsOutput struct { + _ struct{} `type:"structure"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // An array of parameter groups. Each element in the array represents one parameter + // group. + ParameterGroups []*ParameterGroup `type:"list"` +} + +// String returns the string representation +func (s DescribeParameterGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeParameterGroupsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeParameterGroupsOutput) SetNextToken(v string) *DescribeParameterGroupsOutput { + s.NextToken = &v + return s +} + +// SetParameterGroups sets the ParameterGroups field's value. +func (s *DescribeParameterGroupsOutput) SetParameterGroups(v []*ParameterGroup) *DescribeParameterGroupsOutput { + s.ParameterGroups = v + return s +} + +type DescribeParametersInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to include in the response. If more results + // exist than the specified MaxResults value, a token is included in the response + // so that the remaining results can be retrieved. + // + // The value for MaxResults must be between 20 and 100. + MaxResults *int64 `type:"integer"` + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string `type:"string"` + + // The name of the parameter group. + // + // ParameterGroupName is a required field + ParameterGroupName *string `type:"string" required:"true"` + + // How the parameter is defined. For example, system denotes a system-defined + // parameter. + Source *string `type:"string"` +} + +// String returns the string representation +func (s DescribeParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeParametersInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeParametersInput) SetMaxResults(v int64) *DescribeParametersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeParametersInput) SetNextToken(v string) *DescribeParametersInput { + s.NextToken = &v + return s +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *DescribeParametersInput) SetParameterGroupName(v string) *DescribeParametersInput { + s.ParameterGroupName = &v + return s +} + +// SetSource sets the Source field's value. +func (s *DescribeParametersInput) SetSource(v string) *DescribeParametersInput { + s.Source = &v + return s +} + +type DescribeParametersOutput struct { + _ struct{} `type:"structure"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // A list of parameters within a parameter group. Each element in the list represents + // one parameter. + Parameters []*Parameter `type:"list"` +} + +// String returns the string representation +func (s DescribeParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeParametersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeParametersOutput) SetNextToken(v string) *DescribeParametersOutput { + s.NextToken = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *DescribeParametersOutput) SetParameters(v []*Parameter) *DescribeParametersOutput { + s.Parameters = v + return s +} + +type DescribeSubnetGroupsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to include in the response. If more results + // exist than the specified MaxResults value, a token is included in the response + // so that the remaining results can be retrieved. + // + // The value for MaxResults must be between 20 and 100. + MaxResults *int64 `type:"integer"` + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token, up to the value specified by MaxResults. + NextToken *string `type:"string"` + + // The name of the subnet group. + SubnetGroupNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeSubnetGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubnetGroupsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSubnetGroupsInput) SetMaxResults(v int64) *DescribeSubnetGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSubnetGroupsInput) SetNextToken(v string) *DescribeSubnetGroupsInput { + s.NextToken = &v + return s +} + +// SetSubnetGroupNames sets the SubnetGroupNames field's value. +func (s *DescribeSubnetGroupsInput) SetSubnetGroupNames(v []*string) *DescribeSubnetGroupsInput { + s.SubnetGroupNames = v + return s +} + +type DescribeSubnetGroupsOutput struct { + _ struct{} `type:"structure"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // An array of subnet groups. Each element in the array represents a single + // subnet group. + SubnetGroups []*SubnetGroup `type:"list"` +} + +// String returns the string representation +func (s DescribeSubnetGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubnetGroupsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSubnetGroupsOutput) SetNextToken(v string) *DescribeSubnetGroupsOutput { + s.NextToken = &v + return s +} + +// SetSubnetGroups sets the SubnetGroups field's value. +func (s *DescribeSubnetGroupsOutput) SetSubnetGroups(v []*SubnetGroup) *DescribeSubnetGroupsOutput { + s.SubnetGroups = v + return s +} + +// Represents the information required for client programs to connect to the +// configuration endpoint for a DAX cluster, or to an individual node within +// the cluster. +type Endpoint struct { + _ struct{} `type:"structure"` + + // The DNS hostname of the endpoint. + Address *string `type:"string"` + + // The port number that applications should use to connect to the endpoint. + Port *int64 `type:"integer"` +} + +// String returns the string representation +func (s Endpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Endpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *Endpoint) SetAddress(v string) *Endpoint { + s.Address = &v + return s +} + +// SetPort sets the Port field's value. +func (s *Endpoint) SetPort(v int64) *Endpoint { + s.Port = &v + return s +} + +// Represents a single occurrence of something interesting within the system. +// Some examples of events are creating a DAX cluster, adding or removing a +// node, or rebooting a node. +type Event struct { + _ struct{} `type:"structure"` + + // The date and time when the event occurred. + Date *time.Time `type:"timestamp" timestampFormat:"unix"` + + // A user-defined message associated with the event. + Message *string `type:"string"` + + // The source of the event. For example, if the event occurred at the node level, + // the source would be the node ID. + SourceName *string `type:"string"` + + // Specifies the origin of this event - a cluster, a parameter group, a node + // ID, etc. + SourceType *string `type:"string" enum:"SourceType"` +} + +// String returns the string representation +func (s Event) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Event) GoString() string { + return s.String() +} + +// SetDate sets the Date field's value. +func (s *Event) SetDate(v time.Time) *Event { + s.Date = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *Event) SetMessage(v string) *Event { + s.Message = &v + return s +} + +// SetSourceName sets the SourceName field's value. +func (s *Event) SetSourceName(v string) *Event { + s.SourceName = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *Event) SetSourceType(v string) *Event { + s.SourceType = &v + return s +} + +type IncreaseReplicationFactorInput struct { + _ struct{} `type:"structure"` + + // The Availability Zones (AZs) in which the cluster nodes will be created. + // All nodes belonging to the cluster are placed in these Availability Zones. + // Use this parameter if you want to distribute the nodes across multiple AZs. + AvailabilityZones []*string `type:"list"` + + // The name of the DAX cluster that will receive additional nodes. + // + // ClusterName is a required field + ClusterName *string `type:"string" required:"true"` + + // The new number of nodes for the DAX cluster. + // + // NewReplicationFactor is a required field + NewReplicationFactor *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s IncreaseReplicationFactorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IncreaseReplicationFactorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IncreaseReplicationFactorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IncreaseReplicationFactorInput"} + if s.ClusterName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterName")) + } + if s.NewReplicationFactor == nil { + invalidParams.Add(request.NewErrParamRequired("NewReplicationFactor")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *IncreaseReplicationFactorInput) SetAvailabilityZones(v []*string) *IncreaseReplicationFactorInput { + s.AvailabilityZones = v + return s +} + +// SetClusterName sets the ClusterName field's value. +func (s *IncreaseReplicationFactorInput) SetClusterName(v string) *IncreaseReplicationFactorInput { + s.ClusterName = &v + return s +} + +// SetNewReplicationFactor sets the NewReplicationFactor field's value. +func (s *IncreaseReplicationFactorInput) SetNewReplicationFactor(v int64) *IncreaseReplicationFactorInput { + s.NewReplicationFactor = &v + return s +} + +type IncreaseReplicationFactorOutput struct { + _ struct{} `type:"structure"` + + // A description of the DAX cluster. with its new replication factor. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s IncreaseReplicationFactorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IncreaseReplicationFactorOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *IncreaseReplicationFactorOutput) SetCluster(v *Cluster) *IncreaseReplicationFactorOutput { + s.Cluster = v + return s +} + +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // An optional token returned from a prior request. Use this token for pagination + // of results from this action. If this parameter is specified, the response + // includes only results beyond the token. + NextToken *string `type:"string"` + + // The name of the DAX resource to which the tags belong. + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { + s.NextToken = &v + return s +} + +// SetResourceName sets the ResourceName field's value. +func (s *ListTagsInput) SetResourceName(v string) *ListTagsInput { + s.ResourceName = &v + return s +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + // If this value is present, there are additional results to be displayed. To + // retrieve them, call ListTags again, with NextToken set to this value. + NextToken *string `type:"string"` + + // A list of tags currently associated with the DAX cluster. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { + s.Tags = v + return s +} + +// Represents an individual node within a DAX cluster. +type Node struct { + _ struct{} `type:"structure"` + + // The Availability Zone (AZ) in which the node has been deployed. + AvailabilityZone *string `type:"string"` + + // The endpoint for the node, consisting of a DNS name and a port number. Client + // applications can connect directly to a node endpoint, if desired (as an alternative + // to allowing DAX client software to intelligently route requests and responses + // to nodes in the DAX cluster. + Endpoint *Endpoint `type:"structure"` + + // The date and time (in UNIX epoch format) when the node was launched. + NodeCreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // A system-generated identifier for the node. + NodeId *string `type:"string"` + + // The current status of the node. For example: available. + NodeStatus *string `type:"string"` + + // The status of the parameter group associated with this node. For example, + // in-sync. + ParameterGroupStatus *string `type:"string"` +} + +// String returns the string representation +func (s Node) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Node) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *Node) SetAvailabilityZone(v string) *Node { + s.AvailabilityZone = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *Node) SetEndpoint(v *Endpoint) *Node { + s.Endpoint = v + return s +} + +// SetNodeCreateTime sets the NodeCreateTime field's value. +func (s *Node) SetNodeCreateTime(v time.Time) *Node { + s.NodeCreateTime = &v + return s +} + +// SetNodeId sets the NodeId field's value. +func (s *Node) SetNodeId(v string) *Node { + s.NodeId = &v + return s +} + +// SetNodeStatus sets the NodeStatus field's value. +func (s *Node) SetNodeStatus(v string) *Node { + s.NodeStatus = &v + return s +} + +// SetParameterGroupStatus sets the ParameterGroupStatus field's value. +func (s *Node) SetParameterGroupStatus(v string) *Node { + s.ParameterGroupStatus = &v + return s +} + +// Represents a parameter value that is applicable to a particular node type. +type NodeTypeSpecificValue struct { + _ struct{} `type:"structure"` + + // A node type to which the parameter value applies. + NodeType *string `type:"string"` + + // The parameter value for this node type. + Value *string `type:"string"` +} + +// String returns the string representation +func (s NodeTypeSpecificValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeTypeSpecificValue) GoString() string { + return s.String() +} + +// SetNodeType sets the NodeType field's value. +func (s *NodeTypeSpecificValue) SetNodeType(v string) *NodeTypeSpecificValue { + s.NodeType = &v + return s +} + +// SetValue sets the Value field's value. +func (s *NodeTypeSpecificValue) SetValue(v string) *NodeTypeSpecificValue { + s.Value = &v + return s +} + +// Describes a notification topic and its status. Notification topics are used +// for publishing DAX events to subscribers using Amazon Simple Notification +// Service (SNS). +type NotificationConfiguration struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that identifies the topic. + TopicArn *string `type:"string"` + + // The current state of the topic. + TopicStatus *string `type:"string"` +} + +// String returns the string representation +func (s NotificationConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotificationConfiguration) GoString() string { + return s.String() +} + +// SetTopicArn sets the TopicArn field's value. +func (s *NotificationConfiguration) SetTopicArn(v string) *NotificationConfiguration { + s.TopicArn = &v + return s +} + +// SetTopicStatus sets the TopicStatus field's value. +func (s *NotificationConfiguration) SetTopicStatus(v string) *NotificationConfiguration { + s.TopicStatus = &v + return s +} + +// Describes an individual setting that controls some aspect of DAX behavior. +type Parameter struct { + _ struct{} `type:"structure"` + + // A range of values within which the parameter can be set. + AllowedValues *string `type:"string"` + + // The conditions under which changes to this parameter can be applied. For + // example, requires-reboot indicates that a new value for this parameter will + // only take effect if a node is rebooted. + ChangeType *string `type:"string" enum:"ChangeType"` + + // The data type of the parameter. For example, integer: + DataType *string `type:"string"` + + // A description of the parameter + Description *string `type:"string"` + + // Whether the customer is allowed to modify the parameter. + IsModifiable *string `type:"string" enum:"IsModifiable"` + + // A list of node types, and specific parameter values for each node. + NodeTypeSpecificValues []*NodeTypeSpecificValue `type:"list"` + + // The name of the parameter. + ParameterName *string `type:"string"` + + // Determines whether the parameter can be applied to any nodes, or only nodes + // of a particular type. + ParameterType *string `type:"string" enum:"ParameterType"` + + // The value for the parameter. + ParameterValue *string `type:"string"` + + // How the parameter is defined. For example, system denotes a system-defined + // parameter. + Source *string `type:"string"` +} + +// String returns the string representation +func (s Parameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Parameter) GoString() string { + return s.String() +} + +// SetAllowedValues sets the AllowedValues field's value. +func (s *Parameter) SetAllowedValues(v string) *Parameter { + s.AllowedValues = &v + return s +} + +// SetChangeType sets the ChangeType field's value. +func (s *Parameter) SetChangeType(v string) *Parameter { + s.ChangeType = &v + return s +} + +// SetDataType sets the DataType field's value. +func (s *Parameter) SetDataType(v string) *Parameter { + s.DataType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Parameter) SetDescription(v string) *Parameter { + s.Description = &v + return s +} + +// SetIsModifiable sets the IsModifiable field's value. +func (s *Parameter) SetIsModifiable(v string) *Parameter { + s.IsModifiable = &v + return s +} + +// SetNodeTypeSpecificValues sets the NodeTypeSpecificValues field's value. +func (s *Parameter) SetNodeTypeSpecificValues(v []*NodeTypeSpecificValue) *Parameter { + s.NodeTypeSpecificValues = v + return s +} + +// SetParameterName sets the ParameterName field's value. +func (s *Parameter) SetParameterName(v string) *Parameter { + s.ParameterName = &v + return s +} + +// SetParameterType sets the ParameterType field's value. +func (s *Parameter) SetParameterType(v string) *Parameter { + s.ParameterType = &v + return s +} + +// SetParameterValue sets the ParameterValue field's value. +func (s *Parameter) SetParameterValue(v string) *Parameter { + s.ParameterValue = &v + return s +} + +// SetSource sets the Source field's value. +func (s *Parameter) SetSource(v string) *Parameter { + s.Source = &v + return s +} + +// A named set of parameters that are applied to all of the nodes in a DAX cluster. +type ParameterGroup struct { + _ struct{} `type:"structure"` + + // A description of the parameter group. + Description *string `type:"string"` + + // The name of the parameter group. + ParameterGroupName *string `type:"string"` +} + +// String returns the string representation +func (s ParameterGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterGroup) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *ParameterGroup) SetDescription(v string) *ParameterGroup { + s.Description = &v + return s +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *ParameterGroup) SetParameterGroupName(v string) *ParameterGroup { + s.ParameterGroupName = &v + return s +} + +// The status of a parameter group. +type ParameterGroupStatus struct { + _ struct{} `type:"structure"` + + // The node IDs of one or more nodes to be rebooted. + NodeIdsToReboot []*string `type:"list"` + + // The status of parameter updates. + ParameterApplyStatus *string `type:"string"` + + // The name of the parameter group. + ParameterGroupName *string `type:"string"` +} + +// String returns the string representation +func (s ParameterGroupStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterGroupStatus) GoString() string { + return s.String() +} + +// SetNodeIdsToReboot sets the NodeIdsToReboot field's value. +func (s *ParameterGroupStatus) SetNodeIdsToReboot(v []*string) *ParameterGroupStatus { + s.NodeIdsToReboot = v + return s +} + +// SetParameterApplyStatus sets the ParameterApplyStatus field's value. +func (s *ParameterGroupStatus) SetParameterApplyStatus(v string) *ParameterGroupStatus { + s.ParameterApplyStatus = &v + return s +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *ParameterGroupStatus) SetParameterGroupName(v string) *ParameterGroupStatus { + s.ParameterGroupName = &v + return s +} + +// An individual DAX parameter. +type ParameterNameValue struct { + _ struct{} `type:"structure"` + + // The name of the parameter. + ParameterName *string `type:"string"` + + // The value of the parameter. + ParameterValue *string `type:"string"` +} + +// String returns the string representation +func (s ParameterNameValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterNameValue) GoString() string { + return s.String() +} + +// SetParameterName sets the ParameterName field's value. +func (s *ParameterNameValue) SetParameterName(v string) *ParameterNameValue { + s.ParameterName = &v + return s +} + +// SetParameterValue sets the ParameterValue field's value. +func (s *ParameterNameValue) SetParameterValue(v string) *ParameterNameValue { + s.ParameterValue = &v + return s +} + +type RebootNodeInput struct { + _ struct{} `type:"structure"` + + // The name of the DAX cluster containing the node to be rebooted. + // + // ClusterName is a required field + ClusterName *string `type:"string" required:"true"` + + // The system-assigned ID of the node to be rebooted. + // + // NodeId is a required field + NodeId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RebootNodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootNodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootNodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootNodeInput"} + if s.ClusterName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterName")) + } + if s.NodeId == nil { + invalidParams.Add(request.NewErrParamRequired("NodeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterName sets the ClusterName field's value. +func (s *RebootNodeInput) SetClusterName(v string) *RebootNodeInput { + s.ClusterName = &v + return s +} + +// SetNodeId sets the NodeId field's value. +func (s *RebootNodeInput) SetNodeId(v string) *RebootNodeInput { + s.NodeId = &v + return s +} + +type RebootNodeOutput struct { + _ struct{} `type:"structure"` + + // A description of the DAX cluster after a node has been rebooted. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s RebootNodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootNodeOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *RebootNodeOutput) SetCluster(v *Cluster) *RebootNodeOutput { + s.Cluster = v + return s +} + +// An individual VPC security group and its status. +type SecurityGroupMembership struct { + _ struct{} `type:"structure"` + + // The unique ID for this security group. + SecurityGroupIdentifier *string `type:"string"` + + // The status of this security group. + Status *string `type:"string"` +} + +// String returns the string representation +func (s SecurityGroupMembership) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroupMembership) GoString() string { + return s.String() +} + +// SetSecurityGroupIdentifier sets the SecurityGroupIdentifier field's value. +func (s *SecurityGroupMembership) SetSecurityGroupIdentifier(v string) *SecurityGroupMembership { + s.SecurityGroupIdentifier = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *SecurityGroupMembership) SetStatus(v string) *SecurityGroupMembership { + s.Status = &v + return s +} + +// Represents the subnet associated with a DAX cluster. This parameter refers +// to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used +// with DAX. +type Subnet struct { + _ struct{} `type:"structure"` + + // The Availability Zone (AZ) for subnet subnet. + SubnetAvailabilityZone *string `type:"string"` + + // The system-assigned identifier for the subnet. + SubnetIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s Subnet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Subnet) GoString() string { + return s.String() +} + +// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. +func (s *Subnet) SetSubnetAvailabilityZone(v string) *Subnet { + s.SubnetAvailabilityZone = &v + return s +} + +// SetSubnetIdentifier sets the SubnetIdentifier field's value. +func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { + s.SubnetIdentifier = &v + return s +} + +// Represents the output of one of the following actions: +// +// * CreateSubnetGroup +// +// * ModifySubnetGroup +type SubnetGroup struct { + _ struct{} `type:"structure"` + + // The description of the subnet group. + Description *string `type:"string"` + + // The name of the subnet group. + SubnetGroupName *string `type:"string"` + + // A list of subnets associated with the subnet group. + Subnets []*Subnet `type:"list"` + + // The Amazon Virtual Private Cloud identifier (VPC ID) of the subnet group. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s SubnetGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubnetGroup) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *SubnetGroup) SetDescription(v string) *SubnetGroup { + s.Description = &v + return s +} + +// SetSubnetGroupName sets the SubnetGroupName field's value. +func (s *SubnetGroup) SetSubnetGroupName(v string) *SubnetGroup { + s.SubnetGroupName = &v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *SubnetGroup) SetSubnets(v []*Subnet) *SubnetGroup { + s.Subnets = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *SubnetGroup) SetVpcId(v string) *SubnetGroup { + s.VpcId = &v + return s +} + +// A description of a tag. Every tag is a key-value pair. You can add up to +// 50 tags to a single DAX cluster. +// +// AWS-assigned tag names and values are automatically assigned the aws: prefix, +// which the user cannot assign. AWS-assigned tag names do not count towards +// the tag limit of 50. User-assigned tag names have the prefix user:. +// +// You cannot backdate the application of a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // The key for the tag. Tag keys are case sensitive. Every DAX cluster can only + // have one tag with the same key. If you try to add an existing tag (same key), + // the existing tag value will be updated to the new value. + Key *string `type:"string"` + + // The value of the tag. Tag values are case-sensitive and can be null. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The name of the DAX resource to which tags should be added. + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` + + // The tags to be assigned to the DAX resource. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *TagResourceInput) SetResourceName(v string) *TagResourceInput { + s.ResourceName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` + + // The list of tags that are associated with the DAX resource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *TagResourceOutput) SetTags(v []*Tag) *TagResourceOutput { + s.Tags = v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The name of the DAX resource from which the tags should be removed. + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` + + // A list of tag keys. If the DAX cluster has any tags with these keys, then + // the tags are removed from the cluster. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *UntagResourceInput) SetResourceName(v string) *UntagResourceInput { + s.ResourceName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` + + // The tag keys that have been removed from the cluster. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *UntagResourceOutput) SetTags(v []*Tag) *UntagResourceOutput { + s.Tags = v + return s +} + +type UpdateClusterInput struct { + _ struct{} `type:"structure"` + + // The name of the DAX cluster to be modified. + // + // ClusterName is a required field + ClusterName *string `type:"string" required:"true"` + + // A description of the changes being made to the cluster. + Description *string `type:"string"` + + // The Amazon Resource Name (ARN) that identifies the topic. + NotificationTopicArn *string `type:"string"` + + // The current state of the topic. + NotificationTopicStatus *string `type:"string"` + + // The name of a parameter group for this cluster. + ParameterGroupName *string `type:"string"` + + // A range of time when maintenance of DAX cluster software will be performed. + // For example: sun:01:00-sun:09:00. Cluster maintenance normally takes less + // than 30 minutes, and is performed automatically within the maintenance window. + PreferredMaintenanceWindow *string `type:"string"` + + // A list of user-specified security group IDs to be assigned to each node in + // the DAX cluster. If this parameter is not specified, DAX assigns the default + // VPC security group to each node. + SecurityGroupIds []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateClusterInput"} + if s.ClusterName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterName sets the ClusterName field's value. +func (s *UpdateClusterInput) SetClusterName(v string) *UpdateClusterInput { + s.ClusterName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateClusterInput) SetDescription(v string) *UpdateClusterInput { + s.Description = &v + return s +} + +// SetNotificationTopicArn sets the NotificationTopicArn field's value. +func (s *UpdateClusterInput) SetNotificationTopicArn(v string) *UpdateClusterInput { + s.NotificationTopicArn = &v + return s +} + +// SetNotificationTopicStatus sets the NotificationTopicStatus field's value. +func (s *UpdateClusterInput) SetNotificationTopicStatus(v string) *UpdateClusterInput { + s.NotificationTopicStatus = &v + return s +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *UpdateClusterInput) SetParameterGroupName(v string) *UpdateClusterInput { + s.ParameterGroupName = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *UpdateClusterInput) SetPreferredMaintenanceWindow(v string) *UpdateClusterInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *UpdateClusterInput) SetSecurityGroupIds(v []*string) *UpdateClusterInput { + s.SecurityGroupIds = v + return s +} + +type UpdateClusterOutput struct { + _ struct{} `type:"structure"` + + // A description of the DAX cluster, after it has been modified. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s UpdateClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *UpdateClusterOutput) SetCluster(v *Cluster) *UpdateClusterOutput { + s.Cluster = v + return s +} + +type UpdateParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the parameter group. + // + // ParameterGroupName is a required field + ParameterGroupName *string `type:"string" required:"true"` + + // An array of name-value pairs for the parameters in the group. Each element + // in the array represents a single parameter. + // + // ParameterNameValues is a required field + ParameterNameValues []*ParameterNameValue `type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateParameterGroupInput"} + if s.ParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterGroupName")) + } + if s.ParameterNameValues == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterNameValues")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParameterGroupName sets the ParameterGroupName field's value. +func (s *UpdateParameterGroupInput) SetParameterGroupName(v string) *UpdateParameterGroupInput { + s.ParameterGroupName = &v + return s +} + +// SetParameterNameValues sets the ParameterNameValues field's value. +func (s *UpdateParameterGroupInput) SetParameterNameValues(v []*ParameterNameValue) *UpdateParameterGroupInput { + s.ParameterNameValues = v + return s +} + +type UpdateParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // The parameter group that has been modified. + ParameterGroup *ParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s UpdateParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateParameterGroupOutput) GoString() string { + return s.String() +} + +// SetParameterGroup sets the ParameterGroup field's value. +func (s *UpdateParameterGroupOutput) SetParameterGroup(v *ParameterGroup) *UpdateParameterGroupOutput { + s.ParameterGroup = v + return s +} + +type UpdateSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // A description of the subnet group. + Description *string `type:"string"` + + // The name of the subnet group. + // + // SubnetGroupName is a required field + SubnetGroupName *string `type:"string" required:"true"` + + // A list of subnet IDs in the subnet group. + SubnetIds []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSubnetGroupInput"} + if s.SubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateSubnetGroupInput) SetDescription(v string) *UpdateSubnetGroupInput { + s.Description = &v + return s +} + +// SetSubnetGroupName sets the SubnetGroupName field's value. +func (s *UpdateSubnetGroupInput) SetSubnetGroupName(v string) *UpdateSubnetGroupInput { + s.SubnetGroupName = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *UpdateSubnetGroupInput) SetSubnetIds(v []*string) *UpdateSubnetGroupInput { + s.SubnetIds = v + return s +} + +type UpdateSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // The subnet group that has been modified. + SubnetGroup *SubnetGroup `type:"structure"` +} + +// String returns the string representation +func (s UpdateSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSubnetGroupOutput) GoString() string { + return s.String() +} + +// SetSubnetGroup sets the SubnetGroup field's value. +func (s *UpdateSubnetGroupOutput) SetSubnetGroup(v *SubnetGroup) *UpdateSubnetGroupOutput { + s.SubnetGroup = v + return s +} + +const ( + // ChangeTypeImmediate is a ChangeType enum value + ChangeTypeImmediate = "IMMEDIATE" + + // ChangeTypeRequiresReboot is a ChangeType enum value + ChangeTypeRequiresReboot = "REQUIRES_REBOOT" +) + +const ( + // IsModifiableTrue is a IsModifiable enum value + IsModifiableTrue = "TRUE" + + // IsModifiableFalse is a IsModifiable enum value + IsModifiableFalse = "FALSE" + + // IsModifiableConditional is a IsModifiable enum value + IsModifiableConditional = "CONDITIONAL" +) + +const ( + // ParameterTypeDefault is a ParameterType enum value + ParameterTypeDefault = "DEFAULT" + + // ParameterTypeNodeTypeSpecific is a ParameterType enum value + ParameterTypeNodeTypeSpecific = "NODE_TYPE_SPECIFIC" +) + +const ( + // SourceTypeCluster is a SourceType enum value + SourceTypeCluster = "CLUSTER" + + // SourceTypeParameterGroup is a SourceType enum value + SourceTypeParameterGroup = "PARAMETER_GROUP" + + // SourceTypeSubnetGroup is a SourceType enum value + SourceTypeSubnetGroup = "SUBNET_GROUP" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/doc.go b/vendor/github.com/aws/aws-sdk-go/service/dax/doc.go new file mode 100644 index 000000000000..a3b25ccbd5aa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/doc.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package dax provides the client and types for making API +// requests to Amazon DynamoDB Accelerator (DAX). +// +// DAX is a managed caching service engineered for Amazon DynamoDB. DAX dramatically +// speeds up database reads by caching frequently-accessed data from DynamoDB, +// so applications can access that data with sub-millisecond latency. You can +// create a DAX cluster easily, using the AWS Management Console. With a few +// simple modifications to your code, your application can begin taking advantage +// of the DAX cluster and realize significant improvements in read performance. +// +// See https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19 for more information on this service. +// +// See dax package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/dax/ +// +// Using the Client +// +// To contact Amazon DynamoDB Accelerator (DAX) with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon DynamoDB Accelerator (DAX) client DAX for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/dax/#New +package dax diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go new file mode 100644 index 000000000000..24aaf1a23277 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/errors.go @@ -0,0 +1,160 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package dax + +const ( + + // ErrCodeClusterAlreadyExistsFault for service response error code + // "ClusterAlreadyExistsFault". + // + // You already have a DAX cluster with the given identifier. + ErrCodeClusterAlreadyExistsFault = "ClusterAlreadyExistsFault" + + // ErrCodeClusterNotFoundFault for service response error code + // "ClusterNotFoundFault". + // + // The requested cluster ID does not refer to an existing DAX cluster. + ErrCodeClusterNotFoundFault = "ClusterNotFoundFault" + + // ErrCodeClusterQuotaForCustomerExceededFault for service response error code + // "ClusterQuotaForCustomerExceededFault". + // + // You have attempted to exceed the maximum number of DAX clusters for your + // AWS account. + ErrCodeClusterQuotaForCustomerExceededFault = "ClusterQuotaForCustomerExceededFault" + + // ErrCodeInsufficientClusterCapacityFault for service response error code + // "InsufficientClusterCapacityFault". + // + // There are not enough system resources to create the cluster you requested + // (or to resize an already-existing cluster). + ErrCodeInsufficientClusterCapacityFault = "InsufficientClusterCapacityFault" + + // ErrCodeInvalidARNFault for service response error code + // "InvalidARNFault". + // + // The Amazon Resource Name (ARN) supplied in the request is not valid. + ErrCodeInvalidARNFault = "InvalidARNFault" + + // ErrCodeInvalidClusterStateFault for service response error code + // "InvalidClusterStateFault". + // + // The requested DAX cluster is not in the available state. + ErrCodeInvalidClusterStateFault = "InvalidClusterStateFault" + + // ErrCodeInvalidParameterCombinationException for service response error code + // "InvalidParameterCombinationException". + // + // Two or more incompatible parameters were specified. + ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException" + + // ErrCodeInvalidParameterGroupStateFault for service response error code + // "InvalidParameterGroupStateFault". + // + // One or more parameters in a parameter group are in an invalid state. + ErrCodeInvalidParameterGroupStateFault = "InvalidParameterGroupStateFault" + + // ErrCodeInvalidParameterValueException for service response error code + // "InvalidParameterValueException". + // + // The value for a parameter is invalid. + ErrCodeInvalidParameterValueException = "InvalidParameterValueException" + + // ErrCodeInvalidSubnet for service response error code + // "InvalidSubnet". + // + // An invalid subnet identifier was specified. + ErrCodeInvalidSubnet = "InvalidSubnet" + + // ErrCodeInvalidVPCNetworkStateFault for service response error code + // "InvalidVPCNetworkStateFault". + // + // The VPC network is in an invalid state. + ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" + + // ErrCodeNodeNotFoundFault for service response error code + // "NodeNotFoundFault". + // + // None of the nodes in the cluster have the given node ID. + ErrCodeNodeNotFoundFault = "NodeNotFoundFault" + + // ErrCodeNodeQuotaForClusterExceededFault for service response error code + // "NodeQuotaForClusterExceededFault". + // + // You have attempted to exceed the maximum number of nodes for a DAX cluster. + ErrCodeNodeQuotaForClusterExceededFault = "NodeQuotaForClusterExceededFault" + + // ErrCodeNodeQuotaForCustomerExceededFault for service response error code + // "NodeQuotaForCustomerExceededFault". + // + // You have attempted to exceed the maximum number of nodes for your AWS account. + ErrCodeNodeQuotaForCustomerExceededFault = "NodeQuotaForCustomerExceededFault" + + // ErrCodeParameterGroupAlreadyExistsFault for service response error code + // "ParameterGroupAlreadyExistsFault". + // + // The specified parameter group already exists. + ErrCodeParameterGroupAlreadyExistsFault = "ParameterGroupAlreadyExistsFault" + + // ErrCodeParameterGroupNotFoundFault for service response error code + // "ParameterGroupNotFoundFault". + // + // The specified parameter group does not exist. + ErrCodeParameterGroupNotFoundFault = "ParameterGroupNotFoundFault" + + // ErrCodeParameterGroupQuotaExceededFault for service response error code + // "ParameterGroupQuotaExceededFault". + // + // You have attempted to exceed the maximum number of parameter groups. + ErrCodeParameterGroupQuotaExceededFault = "ParameterGroupQuotaExceededFault" + + // ErrCodeSubnetGroupAlreadyExistsFault for service response error code + // "SubnetGroupAlreadyExistsFault". + // + // The specified subnet group already exists. + ErrCodeSubnetGroupAlreadyExistsFault = "SubnetGroupAlreadyExistsFault" + + // ErrCodeSubnetGroupInUseFault for service response error code + // "SubnetGroupInUseFault". + // + // The specified subnet group is currently in use. + ErrCodeSubnetGroupInUseFault = "SubnetGroupInUseFault" + + // ErrCodeSubnetGroupNotFoundFault for service response error code + // "SubnetGroupNotFoundFault". + // + // The requested subnet group name does not refer to an existing subnet group. + ErrCodeSubnetGroupNotFoundFault = "SubnetGroupNotFoundFault" + + // ErrCodeSubnetGroupQuotaExceededFault for service response error code + // "SubnetGroupQuotaExceededFault". + // + // The request cannot be processed because it would exceed the allowed number + // of subnets in a subnet group. + ErrCodeSubnetGroupQuotaExceededFault = "SubnetGroupQuotaExceededFault" + + // ErrCodeSubnetInUse for service response error code + // "SubnetInUse". + // + // The requested subnet is being used by another subnet group. + ErrCodeSubnetInUse = "SubnetInUse" + + // ErrCodeSubnetQuotaExceededFault for service response error code + // "SubnetQuotaExceededFault". + // + // The request cannot be processed because it would exceed the allowed number + // of subnets in a subnet group. + ErrCodeSubnetQuotaExceededFault = "SubnetQuotaExceededFault" + + // ErrCodeTagNotFoundFault for service response error code + // "TagNotFoundFault". + // + // The tag does not exist. + ErrCodeTagNotFoundFault = "TagNotFoundFault" + + // ErrCodeTagQuotaPerResourceExceeded for service response error code + // "TagQuotaPerResourceExceeded". + // + // You have exceeded the maximum number of tags for this DAX cluster. + ErrCodeTagQuotaPerResourceExceeded = "TagQuotaPerResourceExceeded" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/service.go b/vendor/github.com/aws/aws-sdk-go/service/dax/service.go new file mode 100644 index 000000000000..a80ed1441a0a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/service.go @@ -0,0 +1,95 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package dax + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// DAX provides the API operation methods for making requests to +// Amazon DynamoDB Accelerator (DAX). See this package's package overview docs +// for details on the service. +// +// DAX methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type DAX struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "dax" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the DAX 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 DAX client from just a session. +// svc := dax.New(mySession) +// +// // Create a DAX client with additional configuration +// svc := dax.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *DAX { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DAX { + svc := &DAX{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-04-19", + JSONVersion: "1.1", + TargetPrefix: "AmazonDAXV3", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a DAX operation and runs any +// custom request initialization. +func (c *DAX) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 3461bb96aa70..5c4982a7f588 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 @@ -8272,7 +8272,7 @@ func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesI // // * default-vpc: The ID of the default VPC for your account, or none. // -// * max-instances: The maximum number of On-Demand instances that you can +// * max-instances: The maximum number of On-Demand Instances that you can // run. // // * vpc-max-security-groups-per-interface: The maximum number of security @@ -8390,6 +8390,94 @@ func (c *EC2) DescribeAddressesWithContext(ctx aws.Context, input *DescribeAddre return out, req.Send() } +const opDescribeAggregateIdFormat = "DescribeAggregateIdFormat" + +// DescribeAggregateIdFormatRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAggregateIdFormat operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAggregateIdFormat for more information on using the DescribeAggregateIdFormat +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAggregateIdFormatRequest method. +// req, resp := client.DescribeAggregateIdFormatRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAggregateIdFormat +func (c *EC2) DescribeAggregateIdFormatRequest(input *DescribeAggregateIdFormatInput) (req *request.Request, output *DescribeAggregateIdFormatOutput) { + op := &request.Operation{ + Name: opDescribeAggregateIdFormat, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAggregateIdFormatInput{} + } + + output = &DescribeAggregateIdFormatOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAggregateIdFormat API operation for Amazon Elastic Compute Cloud. +// +// Describes the longer ID format settings for all resource types in a specific +// region. This request is useful for performing a quick audit to determine +// whether a specific region is fully opted in for longer IDs (17-character +// IDs). +// +// This request only returns information about resource types that support longer +// IDs. +// +// The following resource types support longer IDs: bundle | conversion-task +// | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task +// | flow-log | image | import-task | instance | internet-gateway | network-acl +// | network-acl-association | network-interface | network-interface-attachment +// | prefix-list | reservation | route-table | route-table-association | security-group +// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association +// | vpc-peering-connection. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeAggregateIdFormat for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAggregateIdFormat +func (c *EC2) DescribeAggregateIdFormat(input *DescribeAggregateIdFormatInput) (*DescribeAggregateIdFormatOutput, error) { + req, out := c.DescribeAggregateIdFormatRequest(input) + return out, req.Send() +} + +// DescribeAggregateIdFormatWithContext is the same as DescribeAggregateIdFormat with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAggregateIdFormat for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeAggregateIdFormatWithContext(ctx aws.Context, input *DescribeAggregateIdFormatInput, opts ...request.Option) (*DescribeAggregateIdFormatOutput, error) { + req, out := c.DescribeAggregateIdFormatRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeAvailabilityZones = "DescribeAvailabilityZones" // DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the @@ -9666,8 +9754,13 @@ 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 | -// snapshot | volume. +// The following resource types support longer IDs: bundle | conversion-task +// | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task +// | flow-log | image | import-task | instance | internet-gateway | network-acl +// | network-acl-association | network-interface | network-interface-attachment +// | prefix-list | reservation | route-table | route-table-association | security-group +// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association +// | vpc-peering-connection. // // 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 same settings @@ -9755,8 +9848,13 @@ func (c *EC2) DescribeIdentityIdFormatRequest(input *DescribeIdentityIdFormatInp // other resource types. For more information, see Resource IDs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) // in the Amazon Elastic Compute Cloud User Guide. // -// The following resource types support longer IDs: instance | reservation | -// snapshot | volume. +// The following resource types support longer IDs: bundle | conversion-task +// | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task +// | flow-log | image | import-task | instance | internet-gateway | network-acl +// | network-acl-association | network-interface | network-interface-attachment +// | prefix-list | reservation | route-table | route-table-association | security-group +// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association +// | vpc-peering-connection. // // These settings apply to the principal specified in the request. They do not // apply to the principal that makes the request. @@ -11519,6 +11617,94 @@ func (c *EC2) DescribePrefixListsWithContext(ctx aws.Context, input *DescribePre return out, req.Send() } +const opDescribePrincipalIdFormat = "DescribePrincipalIdFormat" + +// DescribePrincipalIdFormatRequest generates a "aws/request.Request" representing the +// client's request for the DescribePrincipalIdFormat operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribePrincipalIdFormat for more information on using the DescribePrincipalIdFormat +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribePrincipalIdFormatRequest method. +// req, resp := client.DescribePrincipalIdFormatRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrincipalIdFormat +func (c *EC2) DescribePrincipalIdFormatRequest(input *DescribePrincipalIdFormatInput) (req *request.Request, output *DescribePrincipalIdFormatOutput) { + op := &request.Operation{ + Name: opDescribePrincipalIdFormat, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePrincipalIdFormatInput{} + } + + output = &DescribePrincipalIdFormatOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePrincipalIdFormat API operation for Amazon Elastic Compute Cloud. +// +// Describes the ID format settings for the root user and all IAM roles and +// IAM users that have explicitly specified a longer ID (17-character ID) preference. +// +// By default, all IAM roles and IAM users default to the same ID settings as +// the root user, unless they explicitly override the settings. This request +// is useful for identifying those IAM users and IAM roles that have overridden +// the default ID settings. +// +// The following resource types support longer IDs: bundle | conversion-task +// | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task +// | flow-log | image | import-task | instance | internet-gateway | network-acl +// | network-acl-association | network-interface | network-interface-attachment +// | prefix-list | reservation | route-table | route-table-association | security-group +// | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association +// | vpc-peering-connection. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribePrincipalIdFormat for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrincipalIdFormat +func (c *EC2) DescribePrincipalIdFormat(input *DescribePrincipalIdFormatInput) (*DescribePrincipalIdFormatOutput, error) { + req, out := c.DescribePrincipalIdFormatRequest(input) + return out, req.Send() +} + +// DescribePrincipalIdFormatWithContext is the same as DescribePrincipalIdFormat with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePrincipalIdFormat for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribePrincipalIdFormatWithContext(ctx aws.Context, input *DescribePrincipalIdFormatInput, opts ...request.Option) (*DescribePrincipalIdFormatOutput, error) { + req, out := c.DescribePrincipalIdFormatRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeRegions = "DescribeRegions" // DescribeRegionsRequest generates a "aws/request.Request" representing the @@ -17435,8 +17621,16 @@ 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 | snapshot | volume. +// when they are created. +// +// This request can only be used to modify longer ID settings for resource types +// that are within the opt-in period. Resources currently in their opt-in period +// include: bundle | conversion-task | dhcp-options | elastic-ip-allocation +// | elastic-ip-association | export-task | flow-log | image | import-task | +// internet-gateway | network-acl | network-acl-association | network-interface +// | network-interface-attachment | prefix-list | route-table | route-table-association +// | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association +// | vpc-peering-connection. // // 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 same settings @@ -17528,8 +17722,16 @@ func (c *EC2) ModifyIdentityIdFormatRequest(input *ModifyIdentityIdFormatInput) // user for an account. 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 | -// snapshot | volume. For more information, see Resource IDs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) +// This request can only be used to modify longer ID settings for resource types +// that are within the opt-in period. Resources currently in their opt-in period +// include: bundle | conversion-task | dhcp-options | elastic-ip-allocation +// | elastic-ip-association | export-task | flow-log | image | import-task | +// internet-gateway | network-acl | network-acl-association | network-interface +// | network-interface-attachment | prefix-list | route-table | route-table-association +// | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association +// | vpc-peering-connection.. +// +// For more information, see Resource IDs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) // in the Amazon Elastic Compute Cloud User Guide. // // This setting applies to the principal specified in the request; it does not @@ -24165,7 +24367,7 @@ func (s *AttributeBooleanValue) SetValue(v bool) *AttributeBooleanValue { type AttributeValue struct { _ struct{} `type:"structure"` - // The attribute value. Note that the value is case-sensitive. + // The attribute value. The value is case-sensitive. Value *string `locationName:"value" type:"string"` } @@ -26210,14 +26412,34 @@ type CopyImageInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when - // encrypting the snapshots of an image during a copy operation. This parameter - // is only required if you want to use a non-default CMK; if this parameter - // is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms - // namespace, followed by the region of the CMK, the AWS account ID of the CMK - // owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // An identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted volume. This parameter is only + // required if you want to use a non-default CMK; if this parameter is not specified, + // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted + // flag must also be set. + // + // The CMK identifier may be provided in any of the following formats: + // + // * Key ID + // + // * Key alias + // + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. This action + // will eventually report failure. + // // The specified CMK must exist in the region that the snapshot is being copied - // to. If a KmsKeyId is specified, the Encrypted flag must also be set. + // to. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The name of the new AMI in the destination region. @@ -26369,14 +26591,31 @@ type CopySnapshotInput struct { // the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when - // creating the snapshot copy. This parameter is only required if you want to - // use a non-default CMK; if this parameter is not specified, the default CMK - // for EBS is used. The ARN contains the arn:aws:kms namespace, followed by - // the region of the CMK, the AWS account ID of the CMK owner, the key namespace, - // and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // The specified CMK must exist in the region that the snapshot is being copied - // to. If a KmsKeyId is specified, the Encrypted flag must also be set. + // An identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted volume. This parameter is only + // required if you want to use a non-default CMK; if this parameter is not specified, + // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted + // flag must also be set. + // + // The CMK identifier may be provided in any of the following formats: + // + // * Key ID + // + // * Key alias + // + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. The action + // will eventually fail. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The pre-signed URL that facilitates copying an encrypted snapshot. This parameter @@ -28835,7 +29074,7 @@ type CreateSecurityGroupInput struct { // The name of the security group. // - // Constraints: Up to 255 characters in length + // Constraints: Up to 255 characters in length. Cannot start with sg-. // // Constraints for EC2-Classic: ASCII characters // @@ -29290,13 +29529,31 @@ type CreateVolumeInput struct { // 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 + // An identifier for the AWS Key Management Service (AWS KMS) customer master // key (CMK) to use when creating the encrypted volume. This parameter is only // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, the - // key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // If a KmsKeyId is specified, the Encrypted flag must also be set. + // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted + // flag must also be set. + // + // The CMK identifier may be provided in any of the following formats: + // + // * Key ID + // + // * Key alias + // + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. The action + // will eventually fail. KmsKeyId *string `type:"string"` // The size of the volume, in GiBs. @@ -32999,6 +33256,66 @@ func (s *DescribeAddressesOutput) SetAddresses(v []*Address) *DescribeAddressesO return s } +type DescribeAggregateIdFormatInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeAggregateIdFormatInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAggregateIdFormatInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeAggregateIdFormatInput) SetDryRun(v bool) *DescribeAggregateIdFormatInput { + s.DryRun = &v + return s +} + +type DescribeAggregateIdFormatOutput struct { + _ struct{} `type:"structure"` + + // Information about each resource's ID format. + Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` + + // Indicates whether all resource types in the region are configured to use + // longer IDs. This value is only true if all users are configured to use longer + // IDs for all resources types in the region. + UseLongIdsAggregated *bool `locationName:"useLongIdsAggregated" type:"boolean"` +} + +// String returns the string representation +func (s DescribeAggregateIdFormatOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAggregateIdFormatOutput) GoString() string { + return s.String() +} + +// SetStatuses sets the Statuses field's value. +func (s *DescribeAggregateIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeAggregateIdFormatOutput { + s.Statuses = v + return s +} + +// SetUseLongIdsAggregated sets the UseLongIdsAggregated field's value. +func (s *DescribeAggregateIdFormatOutput) SetUseLongIdsAggregated(v bool) *DescribeAggregateIdFormatOutput { + s.UseLongIdsAggregated = &v + return s +} + // Contains the parameters for DescribeAvailabilityZones. type DescribeAvailabilityZonesInput struct { _ struct{} `type:"structure"` @@ -34568,7 +34885,12 @@ func (s *DescribeIamInstanceProfileAssociationsOutput) SetNextToken(v string) *D type DescribeIdFormatInput struct { _ struct{} `type:"structure"` - // The type of resource: instance | reservation | snapshot | volume + // The type of resource: bundle | conversion-task | dhcp-options | elastic-ip-allocation + // | elastic-ip-association | export-task | flow-log | image | import-task | + // instance | internet-gateway | network-acl | network-acl-association | network-interface + // | network-interface-attachment | prefix-list | reservation | route-table + // | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association + // | volume | vpc | vpc-cidr-block-association | vpc-peering-connection Resource *string `type:"string"` } @@ -34622,7 +34944,12 @@ type DescribeIdentityIdFormatInput struct { // PrincipalArn is a required field PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` - // The type of resource: instance | reservation | snapshot | volume + // The type of resource: bundle | conversion-task | dhcp-options | elastic-ip-allocation + // | elastic-ip-association | export-task | flow-log | image | import-task | + // instance | internet-gateway | network-acl | network-acl-association | network-interface + // | network-interface-attachment | prefix-list | reservation | route-table + // | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association + // | volume | vpc | vpc-cidr-block-association | vpc-peering-connection Resource *string `locationName:"resource" type:"string"` } @@ -37418,6 +37745,98 @@ func (s *DescribePrefixListsOutput) SetPrefixLists(v []*PrefixList) *DescribePre return s } +type DescribePrincipalIdFormatInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // 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"` + + // The token to request the next page of results. + NextToken *string `type:"string"` + + // The type of resource: bundle | conversion-task | dhcp-options | elastic-ip-allocation + // | elastic-ip-association | export-task | flow-log | image | import-task | + // instance | internet-gateway | network-acl | network-acl-association | network-interface + // | network-interface-attachment | prefix-list | reservation | route-table + // | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association + // | volume | vpc | vpc-cidr-block-association | vpc-peering-connection + Resources []*string `locationName:"Resource" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePrincipalIdFormatInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrincipalIdFormatInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribePrincipalIdFormatInput) SetDryRun(v bool) *DescribePrincipalIdFormatInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribePrincipalIdFormatInput) SetMaxResults(v int64) *DescribePrincipalIdFormatInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePrincipalIdFormatInput) SetNextToken(v string) *DescribePrincipalIdFormatInput { + s.NextToken = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *DescribePrincipalIdFormatInput) SetResources(v []*string) *DescribePrincipalIdFormatInput { + s.Resources = v + return s +} + +type DescribePrincipalIdFormatOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the ID format settings for the ARN. + Principals []*PrincipalIdFormat `locationName:"principalSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePrincipalIdFormatOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrincipalIdFormatOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePrincipalIdFormatOutput) SetNextToken(v string) *DescribePrincipalIdFormatOutput { + s.NextToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *DescribePrincipalIdFormatOutput) SetPrincipals(v []*PrincipalIdFormat) *DescribePrincipalIdFormatOutput { + s.Principals = v + return s +} + // Contains the parameters for DescribeRegions. type DescribeRegionsInput struct { _ struct{} `type:"structure"` @@ -38648,7 +39067,8 @@ type DescribeSecurityGroupsInput struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another request with the returned NextToken value. - // This value can be between 5 and 1000. + // This value can be between 5 and 1000. If this parameter is not specified, + // then all results are returned. MaxResults *int64 `type:"integer"` // The token to request the next page of results. @@ -39740,8 +40160,8 @@ func (s *DescribeSpotPriceHistoryInput) SetStartTime(v time.Time) *DescribeSpotP type DescribeSpotPriceHistoryOutput struct { _ struct{} `type:"structure"` - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. + // The token required to retrieve the next set of results. This value is an + // empty string when there are no more results to return. NextToken *string `locationName:"nextToken" type:"string"` // The historical Spot prices. @@ -43295,7 +43715,8 @@ type EbsBlockDevice struct { // it is not used in requests to create gp2, st1, sc1, or standard volumes. Iops *int64 `locationName:"iops" type:"integer"` - // ID for a user-managed CMK under which the EBS volume is encrypted. + // Identifier (key ID, key alias, ID ARN, or alias ARN) for a user-managed CMK + // under which the EBS volume is encrypted. // // Note: This parameter is only supported on BlockDeviceMapping objects called // by RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), @@ -46241,7 +46662,7 @@ type ImageDiskContainer struct { // The format of the disk image being imported. // - // Valid values: RAW | VHD | VMDK | OVA + // Valid values: VHD | VMDK | OVA Format *string `type:"string"` // The ID of the EBS snapshot to be used for importing the snapshot. @@ -46763,7 +47184,7 @@ type ImportInstanceLaunchSpecification struct { InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` // The instance type. For more information about the instance types that you - // can import, see Instance Types (http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#vmimport-instance-types) + // can import, see Instance Types (http://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types) // in the VM Import/Export User Guide. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` @@ -46779,9 +47200,7 @@ type ImportInstanceLaunchSpecification struct { // [EC2-VPC] The ID of the subnet in which to launch the instance. SubnetId *string `locationName:"subnetId" type:"string"` - // The user data to make available to the instance. If you are using an AWS - // SDK or command line tool, Base64-encoding is performed for you, and you can - // load the text from a file. Otherwise, you must provide Base64-encoded text. + // The Base64-encoded user data to make available to the instance. UserData *UserData `locationName:"userData" type:"structure"` } @@ -49431,9 +49850,7 @@ type LaunchSpecification struct { // The ID of the subnet in which to launch the instance. SubnetId *string `locationName:"subnetId" type:"string"` - // The user data to make available to the instances. If you are using an AWS - // SDK or command line tool, Base64-encoding is performed for you, and you can - // load the text from a file. Otherwise, you must provide Base64-encoded text. + // The Base64-encoded user data for the instance. UserData *string `locationName:"userData" type:"string"` } @@ -51318,7 +51735,15 @@ func (s *ModifyHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ModifyHostsO type ModifyIdFormatInput struct { _ struct{} `type:"structure"` - // The type of resource: instance | reservation | snapshot | volume + // The type of resource: bundle | conversion-task | dhcp-options | elastic-ip-allocation + // | elastic-ip-association | export-task | flow-log | image | import-task | + // internet-gateway | network-acl | network-acl-association | network-interface + // | network-interface-attachment | prefix-list | route-table | route-table-association + // | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association + // | vpc-peering-connection. + // + // Alternatively, use the all-current option to include all resource types that + // are currently within their opt-in period for longer IDs. // // Resource is a required field Resource *string `type:"string" required:"true"` @@ -51392,7 +51817,15 @@ type ModifyIdentityIdFormatInput struct { // PrincipalArn is a required field PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` - // The type of resource: instance | reservation | snapshot | volume + // The type of resource: bundle | conversion-task | dhcp-options | elastic-ip-allocation + // | elastic-ip-association | export-task | flow-log | image | import-task | + // internet-gateway | network-acl | network-acl-association | network-interface + // | network-interface-attachment | prefix-list | route-table | route-table-association + // | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association + // | vpc-peering-connection. + // + // Alternatively, use the all-current option to include all resource types that + // are currently within their opt-in period for longer IDs. // // Resource is a required field Resource *string `locationName:"resource" type:"string" required:"true"` @@ -53126,7 +53559,7 @@ type ModifyVpcEndpointServiceConfigurationInput struct { // The Amazon Resource Names (ARNs) of Network Load Balancers to add to your // service configuration. - AddNetworkLoadBalancerArns []*string `locationName:"addNetworkLoadBalancerArn" locationNameList:"item" type:"list"` + AddNetworkLoadBalancerArns []*string `locationName:"AddNetworkLoadBalancerArn" locationNameList:"item" type:"list"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -53136,7 +53569,7 @@ type ModifyVpcEndpointServiceConfigurationInput struct { // The Amazon Resource Names (ARNs) of Network Load Balancers to remove from // your service configuration. - RemoveNetworkLoadBalancerArns []*string `locationName:"removeNetworkLoadBalancerArn" locationNameList:"item" type:"list"` + RemoveNetworkLoadBalancerArns []*string `locationName:"RemoveNetworkLoadBalancerArn" locationNameList:"item" type:"list"` // The ID of the service. // @@ -55211,6 +55644,39 @@ func (s *PricingDetail) SetPrice(v float64) *PricingDetail { return s } +// PrincipalIdFormat description +type PrincipalIdFormat struct { + _ struct{} `type:"structure"` + + // PrincipalIdFormatARN description + Arn *string `locationName:"arn" type:"string"` + + // PrincipalIdFormatStatuses description + Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s PrincipalIdFormat) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PrincipalIdFormat) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *PrincipalIdFormat) SetArn(v string) *PrincipalIdFormat { + s.Arn = &v + return s +} + +// SetStatuses sets the Statuses field's value. +func (s *PrincipalIdFormat) SetStatuses(v []*IdFormat) *PrincipalIdFormat { + s.Statuses = v + return s +} + // Describes a secondary private IPv4 address for a network interface. type PrivateIpAddressSpecification struct { _ struct{} `type:"structure"` @@ -57297,12 +57763,10 @@ type RequestLaunchTemplateData struct { // are created during launch. TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"` - // The user data to make available to the instance. For more information, see - // Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) + // The Base64-encoded user data to make available to the instance. For more + // information, see Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - // (Windows). If you are using a command line tool, base64-encoding is performed - // for you and you can load the text from a file. Otherwise, you must provide - // base64-encoded text. + // (Windows). UserData *string `type:"string"` } @@ -57827,9 +58291,7 @@ type RequestSpotLaunchSpecification struct { // The ID of the subnet in which to launch the instance. SubnetId *string `locationName:"subnetId" type:"string"` - // The user data to make available to the instances. If you are using an AWS - // SDK or command line tool, Base64-encoding is performed for you, and you can - // load the text from a file. Otherwise, you must provide Base64-encoded text. + // The Base64-encoded user data for the instance. UserData *string `locationName:"userData" type:"string"` } @@ -62422,7 +62884,7 @@ type SnapshotDiskContainer struct { // The format of the disk image being imported. // - // Valid values: RAW | VHD | VMDK | OVA + // Valid values: VHD | VMDK | OVA Format *string `type:"string"` // The URL to the Amazon S3-based disk image being imported. It can either be @@ -62691,9 +63153,7 @@ type SpotFleetLaunchSpecification struct { // The tags to apply during creation. TagSpecifications []*SpotFleetTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"` - // The user data to make available to the instances. If you are using an AWS - // SDK or command line tool, Base64-encoding is performed for you, and you can - // load the text from a file. Otherwise, you must provide Base64-encoded text. + // The Base64-encoded user data to make available to the instances. UserData *string `locationName:"userData" type:"string"` // The number of units provided by the specified instance type. These are the @@ -67007,7 +67467,7 @@ type VpnConnectionOptionsSpecification struct { // Indicate whether the VPN connection uses static routes only. If you are creating // a VPN connection for a device that does not support BGP, you must specify - // true. + // true. Use CreateVpnConnectionRoute to create a static route. // // Default: false StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` @@ -68216,6 +68676,9 @@ const ( // NetworkInterfaceStatusAvailable is a NetworkInterfaceStatus enum value NetworkInterfaceStatusAvailable = "available" + // NetworkInterfaceStatusAssociated is a NetworkInterfaceStatus enum value + NetworkInterfaceStatusAssociated = "associated" + // NetworkInterfaceStatusAttaching is a NetworkInterfaceStatus enum value NetworkInterfaceStatusAttaching = "attaching" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go index 432a54df4e74..909e05a14f32 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go @@ -4,7 +4,7 @@ // requests to Amazon Elastic Compute Cloud. // // Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity -// in the AWS Cloud. Using Amazon EC2 eliminates your need to invest in hardware +// in the AWS Cloud. Using Amazon EC2 eliminates the need to invest in hardware // up front, so you can develop and deploy applications faster. // // See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index ac7f4ae93577..5a2e9cfe6007 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -3573,6 +3573,9 @@ type Action struct { // Information about the NETWORK_CONNECTION action described in this finding. NetworkConnectionAction *NetworkConnectionAction `locationName:"networkConnectionAction" type:"structure"` + + // Information about the PORT_PROBE action described in this finding. + PortProbeAction *PortProbeAction `locationName:"portProbeAction" type:"structure"` } // String returns the string representation @@ -3609,6 +3612,12 @@ func (s *Action) SetNetworkConnectionAction(v *NetworkConnectionAction) *Action return s } +// SetPortProbeAction sets the PortProbeAction field's value. +func (s *Action) SetPortProbeAction(v *PortProbeAction) *Action { + s.PortProbeAction = v + return s +} + // Archive Findings Request type ArchiveFindingsInput struct { _ struct{} `type:"structure"` @@ -6830,6 +6839,72 @@ func (s *Organization) SetOrg(v string) *Organization { return s } +// Information about the PORT_PROBE action described in this finding. +type PortProbeAction struct { + _ struct{} `type:"structure"` + + // Port probe blocked information. + Blocked *bool `locationName:"blocked" type:"boolean"` + + // A list of port probe details objects. + PortProbeDetails []*PortProbeDetail `locationName:"portProbeDetails" type:"list"` +} + +// String returns the string representation +func (s PortProbeAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PortProbeAction) GoString() string { + return s.String() +} + +// SetBlocked sets the Blocked field's value. +func (s *PortProbeAction) SetBlocked(v bool) *PortProbeAction { + s.Blocked = &v + return s +} + +// SetPortProbeDetails sets the PortProbeDetails field's value. +func (s *PortProbeAction) SetPortProbeDetails(v []*PortProbeDetail) *PortProbeAction { + s.PortProbeDetails = v + return s +} + +// Details about the port probe finding. +type PortProbeDetail struct { + _ struct{} `type:"structure"` + + // Local port information of the connection. + LocalPortDetails *LocalPortDetails `locationName:"localPortDetails" type:"structure"` + + // Remote IP information of the connection. + RemoteIpDetails *RemoteIpDetails `locationName:"remoteIpDetails" type:"structure"` +} + +// String returns the string representation +func (s PortProbeDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PortProbeDetail) GoString() string { + return s.String() +} + +// SetLocalPortDetails sets the LocalPortDetails field's value. +func (s *PortProbeDetail) SetLocalPortDetails(v *LocalPortDetails) *PortProbeDetail { + s.LocalPortDetails = v + return s +} + +// SetRemoteIpDetails sets the RemoteIpDetails field's value. +func (s *PortProbeDetail) SetRemoteIpDetails(v *RemoteIpDetails) *PortProbeDetail { + s.RemoteIpDetails = v + return s +} + // Other private IP address information of the EC2 instance. type PrivateIpAddressDetails struct { _ struct{} `type:"structure"` 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 3e66c27c08c4..e67cf240d477 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 @@ -3468,6 +3468,9 @@ func (c *KMS) RetireGrantRequest(input *RetireGrantInput) (req *request.Request, // API operation RetireGrant for usage and error information. // // Returned Error Codes: +// * ErrCodeInvalidArnException "InvalidArnException" +// The request was rejected because a specified ARN was not valid. +// // * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" // The request was rejected because the specified grant token is not valid. // 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 2bfd463adcf6..a378d97c126c 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 @@ -1504,12 +1504,12 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // MariaDB, or PostgreSQL. For more information, see Working with PostgreSQL, // MySQL, and MariaDB Read Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html). // -// Amazon Aurora does not support this action. You must call the CreateDBInstance +// Amazon Aurora doesn't support this action. You must call the CreateDBInstance // action to create a DB instance for an Aurora DB cluster. // // All Read Replica DB instances are created with backups disabled. All other // DB instance attributes (including DB security groups and DB parameter groups) -// are inherited from the source DB instance, except as specified below. +// are inherited from the source DB instance, except as specified following. // // Your source DB instance must have backup retention enabled. // @@ -3126,7 +3126,7 @@ func (c *RDS) DescribeAccountAttributesRequest(input *DescribeAccountAttributesI // The description for a quota includes the quota name, current usage toward // that quota, and the quota's maximum value. // -// This command does not take any parameters. +// This command doesn't take any parameters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7691,6 +7691,8 @@ func (c *RDS) PromoteReadReplicaRequest(input *PromoteReadReplicaInput) (req *re // promotion process. Once the instance is promoted to a primary instance, backups // are taken based on your backup settings. // +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -8903,16 +8905,19 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // // If your intent is to replace your original DB instance with the new, restored // DB instance, then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot -// action. RDS does not allow two DB instances with the same name. Once you -// have renamed your original DB instance with a different identifier, then -// you can pass the original name of the DB instance as the DBInstanceIdentifier -// in the call to the RestoreDBInstanceFromDBSnapshot action. The result is -// that you will replace the original DB instance with the DB instance created -// from the snapshot. +// action. RDS doesn't allow two DB instances with the same name. Once you have +// renamed your original DB instance with a different identifier, then you can +// pass the original name of the DB instance as the DBInstanceIdentifier in +// the call to the RestoreDBInstanceFromDBSnapshot action. The result is that +// you will replace the original DB instance with the DB instance created from +// the snapshot. // // If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier // must be the ARN of the shared DB snapshot. // +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, +// use RestoreDBClusterFromSnapshot. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -9203,6 +9208,9 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // with mirroring; in this case, the instance becomes a mirrored deployment // and not a single-AZ deployment. // +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, +// use RestoreDBClusterToPointInTime. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -9440,7 +9448,7 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // AWS CLI command, or the StopDBInstance action. For more information, see // Stopping and Starting a DB instance in the AWS RDS user guide. // -// This command does not apply to Aurora MySQL and Aurora PostgreSQL. +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9563,7 +9571,7 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // do a point-in-time restore if necessary. For more information, see Stopping // and Starting a DB instance in the AWS RDS user guide. // -// This command does not apply to Aurora MySQL and Aurora PostgreSQL. +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11143,16 +11151,21 @@ type CreateDBClusterInput struct { // The name of the database engine to be used for this DB cluster. // - // Valid Values: aurora, aurora-postgresql + // Valid Values: aurora (for MySQL 5.6-compatible Aurora), aurora-mysql (for + // MySQL 5.7-compatible Aurora), and aurora-postgresql // // Engine is a required field Engine *string `type:"string" required:"true"` // The version number of the database engine to use. // - // Aurora + // Aurora MySQL // - // Example: 5.6.10a + // Example: 5.6.10a, 5.7.12 + // + // Aurora PostgreSQL + // + // Example: 9.6.3 EngineVersion *string `type:"string"` // The AWS KMS key identifier for an encrypted DB cluster. @@ -11507,6 +11520,14 @@ type CreateDBClusterParameterGroupInput struct { // and can be applied only to a DB cluster running a database engine and engine // version compatible with that DB cluster parameter group family. // + // Aurora MySQL + // + // Example: aurora5.6, aurora-mysql5.7 + // + // Aurora PostgreSQL + // + // Example: aurora-postgresql9.6 + // // DBParameterGroupFamily is a required field DBParameterGroupFamily *string `type:"string" required:"true"` @@ -11994,7 +12015,9 @@ type CreateDBInstanceInput struct { // // Valid Values: // - // * aurora + // * aurora (for MySQL 5.6-compatible Aurora) + // + // * aurora-mysql (for MySQL 5.7-compatible Aurora) // // * aurora-postgresql // @@ -12874,14 +12897,14 @@ type CreateDBInstanceReadReplicaInput struct { // a MonitoringRoleArn value. MonitoringRoleArn *string `type:"string"` - // Specifies whether the read replica is in a Multi-AZ deployment. + // Specifies whether the Read Replica is in a Multi-AZ deployment. // // You can create a Read Replica as a Multi-AZ DB instance. RDS creates a standby // of your replica in another Availability Zone for failover support for the // replica. Creating your Read Replica as a Multi-AZ DB instance is independent // of whether the source database is a Multi-AZ DB instance. // - // Currently PostgreSQL Read Replicas can only be created as single-AZ DB instances. + // Currently, you can't create PostgreSQL Read Replicas as Multi-AZ DB instances. MultiAZ *bool `type:"boolean"` // The option group the DB instance is associated with. If omitted, the default @@ -21492,7 +21515,7 @@ type ModifyDBClusterInput struct { NewDBClusterIdentifier *string `type:"string"` // A value that indicates that the DB cluster should be associated with the - // specified option group. Changing this parameter does not result in an outage + // specified option group. Changing this parameter doesn't result in an outage // except in the following case, and the change is applied during the next maintenance // window unless the ApplyImmediately parameter is set to true for this request. // If the parameter change results in an option group that enables OEM, this @@ -21851,8 +21874,8 @@ type ModifyDBInstanceInput struct { AllocatedStorage *int64 `type:"integer"` // Indicates that major version upgrades are allowed. Changing this parameter - // does not result in an outage and the change is asynchronously applied as - // soon as possible. + // doesn't result in an outage and the change is asynchronously applied as soon + // as possible. // // Constraints: This parameter must be set to true when specifying a value for // the EngineVersion parameter that is a different major version than the DB @@ -21875,8 +21898,8 @@ type ModifyDBInstanceInput struct { ApplyImmediately *bool `type:"boolean"` // Indicates that minor version upgrades are applied automatically to the DB - // instance during the maintenance window. Changing this parameter does not - // result in an outage except in the following case and the change is asynchronously + // instance during the maintenance window. Changing this parameter doesn't result + // in an outage except in the following case and the change is asynchronously // applied as soon as possible. An outage will result if this parameter is set // to true during the maintenance window, and a newer minor version is available, // and RDS has enabled auto patching for that engine version. @@ -21947,7 +21970,7 @@ type ModifyDBInstanceInput struct { DBInstanceIdentifier *string `type:"string" required:"true"` // The name of the DB parameter group to apply to the DB instance. Changing - // this setting does not result in an outage. The parameter group name itself + // this setting doesn't result in an outage. The parameter group name itself // is changed immediately, but the actual parameter changes are not applied // until you reboot the instance without failover. The db instance will NOT // be rebooted automatically and the parameter changes will NOT be applied during @@ -22008,7 +22031,7 @@ type ModifyDBInstanceInput struct { DBPortNumber *int64 `type:"integer"` // A list of DB security groups to authorize on this DB instance. Changing this - // setting does not result in an outage and the change is asynchronously applied + // setting doesn't result in an outage and the change is asynchronously applied // as soon as possible. // // Constraints: @@ -22075,7 +22098,7 @@ type ModifyDBInstanceInput struct { // The new Provisioned IOPS (I/O operations per second) value for the RDS instance. // - // Changing this setting does not result in an outage and the change is applied + // Changing this setting doesn't result in an outage and the change is applied // during the next maintenance window unless the ApplyImmediately parameter // is set to true for this request. If you are migrating from Provisioned IOPS // to standard storage, set this value to 0. The DB instance will require a @@ -22110,7 +22133,7 @@ type ModifyDBInstanceInput struct { // The new password for the master user. The password can include any printable // ASCII character except "/", """, or "@". // - // Changing this parameter does not result in an outage and the change is asynchronously + // Changing this parameter doesn't result in an outage and the change is asynchronously // applied as soon as possible. Between the time of the request and the completion // of the request, the MasterUserPassword element exists in the PendingModifiedValues // element of the operation response. @@ -22167,7 +22190,7 @@ type ModifyDBInstanceInput struct { MonitoringRoleArn *string `type:"string"` // Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter - // does not result in an outage and the change is applied during the next maintenance + // doesn't result in an outage and the change is applied during the next maintenance // window unless the ApplyImmediately parameter is set to true for this request. MultiAZ *bool `type:"boolean"` @@ -22189,7 +22212,7 @@ type ModifyDBInstanceInput struct { NewDBInstanceIdentifier *string `type:"string"` // Indicates that the DB instance should be associated with the specified option - // group. Changing this parameter does not result in an outage except in the + // group. Changing this parameter doesn't result in an outage except in the // following case and the change is applied during the next maintenance window // unless the ApplyImmediately parameter is set to true for this request. If // the parameter change results in an option group that enables OEM, this change @@ -22208,7 +22231,7 @@ type ModifyDBInstanceInput struct { // The daily time range during which automated backups are created if automated // backups are enabled, as determined by the BackupRetentionPeriod parameter. - // Changing this parameter does not result in an outage and the change is asynchronously + // Changing this parameter doesn't result in an outage and the change is asynchronously // applied as soon as possible. // // Amazon Aurora @@ -22228,8 +22251,8 @@ type ModifyDBInstanceInput struct { PreferredBackupWindow *string `type:"string"` // The weekly time range (in UTC) during which system maintenance can occur, - // which might result in an outage. Changing this parameter does not result - // in an outage, except in the following situation, and the change is asynchronously + // which might result in an outage. Changing this parameter doesn't result in + // an outage, except in the following situation, and the change is asynchronously // applied as soon as possible. If there are pending actions that cause a reboot, // and the maintenance window is changed to include the current time, then changing // this parameter will cause a reboot of the DB instance. If moving this window @@ -25573,9 +25596,13 @@ type RestoreDBClusterFromS3Input struct { // The version number of the database engine to use. // - // Aurora + // Aurora MySQL // // Example: 5.6.10a + // + // Aurora PostgreSQL + // + // Example: 9.6.3 EngineVersion *string `type:"string"` // The AWS KMS key identifier for an encrypted DB cluster. @@ -26492,8 +26519,6 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // * For MySQL 5.7, minor version 5.7.16 or higher // - // * Aurora 5.6 or higher. - // // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` @@ -26506,10 +26531,6 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // Valid Values: // - // * aurora - // - // * aurora-postgresql - // // * mariadb // // * mysql @@ -27438,8 +27459,6 @@ type RestoreDBInstanceToPointInTimeInput struct { // // * For MySQL 5.7, minor version 5.7.16 or higher // - // * Aurora 5.6 or higher. - // // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` @@ -27451,10 +27470,6 @@ type RestoreDBInstanceToPointInTimeInput struct { // // Valid Values: // - // * aurora - // - // * aurora-postgresql - // // * mariadb // // * mysql diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md b/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md index 2e0c0cd36428..2e140809fc49 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md @@ -1,8 +1,88 @@ +## 1.10.0 (February 24, 2018) + +NOTES: + +* resource/aws_dx_lag: `number_of_connections` was deprecated and will be removed in future major version. Use `aws_dx_connection` and `aws_dx_connection_association` resources instead. Default connections will be removed as part of LAG creation automatically in future major version. ([#3367](https://github.com/terraform-providers/terraform-provider-aws/issues/3367)) + +FEATURES: + +* **New Data Source:** `aws_inspector_rules_packages` ([#3175](https://github.com/terraform-providers/terraform-provider-aws/issues/3175)) +* **New Resource:** `aws_api_gateway_vpc_link` ([#2512](https://github.com/terraform-providers/terraform-provider-aws/issues/2512)) +* **New Resource:** `aws_appsync_graphql_api` ([#2494](https://github.com/terraform-providers/terraform-provider-aws/issues/2494)) +* **New Resource:** `aws_dax_cluster` ([#2884](https://github.com/terraform-providers/terraform-provider-aws/issues/2884)) +* **New Resource:** `aws_gamelift_alias` ([#3353](https://github.com/terraform-providers/terraform-provider-aws/issues/3353)) +* **New Resource:** `aws_gamelift_fleet` ([#3327](https://github.com/terraform-providers/terraform-provider-aws/issues/3327)) +* **New Resource:** `aws_lb_listener_certificate` ([#2686](https://github.com/terraform-providers/terraform-provider-aws/issues/2686)) +* **New Resource:** `aws_s3_bucket_metric` ([#916](https://github.com/terraform-providers/terraform-provider-aws/issues/916)) +* **New Resource:** `aws_ses_domain_mail_from` ([#2029](https://github.com/terraform-providers/terraform-provider-aws/issues/2029)) +* **New Resource:** `aws_iot_thing_type` ([#3302](https://github.com/terraform-providers/terraform-provider-aws/issues/3302)) + +ENHANCEMENTS: + +* data-source/aws_kms_alias: Always return `target_key_arn` ([#3304](https://github.com/terraform-providers/terraform-provider-aws/issues/3304)) +* resource/aws_autoscaling_policy: Add support for `target_tracking_configuration` ([#2611](https://github.com/terraform-providers/terraform-provider-aws/issues/2611)) +* resource/aws_codebuild_project: Support VPC configuration ([#2547](https://github.com/terraform-providers/terraform-provider-aws/issues/2547)] [[#3324](https://github.com/terraform-providers/terraform-provider-aws/issues/3324)) +* resource/aws_cloudtrail: Add `event_selector` argument ([#2258](https://github.com/terraform-providers/terraform-provider-aws/issues/2258)) +* resource/aws_codedeploy_deployment_group: Validate DeploymentReady and InstanceReady `trigger_events` ([#3412](https://github.com/terraform-providers/terraform-provider-aws/issues/3412)) +* resource/aws_db_parameter_group: Validate underscore `name` during plan ([#3396](https://github.com/terraform-providers/terraform-provider-aws/issues/3396)) +* resource/aws_directory_service_directory Add `edition` argument ([#3421](https://github.com/terraform-providers/terraform-provider-aws/issues/3421)) +* resource/aws_directory_service_directory Validate `size` argument ([#3453](https://github.com/terraform-providers/terraform-provider-aws/issues/3453)) +* resource/aws_dx_connection: Add support for tagging ([#2990](https://github.com/terraform-providers/terraform-provider-aws/issues/2990)) +* resource/aws_dx_connection: Add support for import ([#2992](https://github.com/terraform-providers/terraform-provider-aws/issues/2992)) +* resource/aws_dx_lag: Add support for tagging ([#2990](https://github.com/terraform-providers/terraform-provider-aws/issues/2990)) +* resource/aws_dx_lag: Add support for import ([#2992](https://github.com/terraform-providers/terraform-provider-aws/issues/2992)) +* resource/aws_emr_cluster: Add `autoscaling_policy` argument ([#2877](https://github.com/terraform-providers/terraform-provider-aws/issues/2877)) +* resource/aws_emr_cluster: Add `scale_down_behavior` argument ([#3063](https://github.com/terraform-providers/terraform-provider-aws/issues/3063)) +* resource/aws_instance: Expose reason of `shutting-down` state during creation ([#3371](https://github.com/terraform-providers/terraform-provider-aws/issues/3371)) +* resource/aws_instance: Include size of user_data in validation error message ([#2971](https://github.com/terraform-providers/terraform-provider-aws/issues/2971)) +* resource/aws_instance: Remove extra API call on creation for SGs ([#3426](https://github.com/terraform-providers/terraform-provider-aws/issues/3426)) +* resource/aws_lambda_function: Recompute `version` and `qualified_arn` attributes on publish ([#3032](https://github.com/terraform-providers/terraform-provider-aws/issues/3032)) +* resource/aws_lb_target_group: Allow stickiness block set to false with TCP ([#2954](https://github.com/terraform-providers/terraform-provider-aws/issues/2954)) +* resource/aws_lb_listener_rule: Validate `priority` over 50000 ([#3379](https://github.com/terraform-providers/terraform-provider-aws/issues/3379)) +* resource/aws_lb_listener_rule: Make `priority` argument optional ([#3219](https://github.com/terraform-providers/terraform-provider-aws/issues/3219)) +* resource/aws_rds_cluster: Add `hosted_zone_id` attribute ([#3267](https://github.com/terraform-providers/terraform-provider-aws/issues/3267)) +* resource/aws_rds_cluster: Add support for `source_region` (encrypted cross-region replicas) ([#3415](https://github.com/terraform-providers/terraform-provider-aws/issues/3415)) +* resource/aws_rds_cluster_instance: Support `availability_zone` ([#2812](https://github.com/terraform-providers/terraform-provider-aws/issues/2812)) +* resource/aws_rds_cluster_parameter_group: Validate underscore `name` during plan ([#3396](https://github.com/terraform-providers/terraform-provider-aws/issues/3396)) +* resource/aws_route53_record Add `allow_overwrite` argument ([#2926](https://github.com/terraform-providers/terraform-provider-aws/issues/2926)) +* resource/aws_s3_bucket Ssupport for SSE-KMS replication configuration ([#2625](https://github.com/terraform-providers/terraform-provider-aws/issues/2625)) +* resource/aws_spot_fleet_request: Validate `iam_fleet_role` as ARN during plan ([#3431](https://github.com/terraform-providers/terraform-provider-aws/issues/3431)) +* resource/aws_sqs_queue: Validate `name` during plan ([#2837](https://github.com/terraform-providers/terraform-provider-aws/issues/2837)) +* resource/aws_ssm_association: Allow updating `targets` ([#2807](https://github.com/terraform-providers/terraform-provider-aws/issues/2807)) +* resource/aws_service_discovery_service: Support routing policy and update the type of DNS record ([#3273](https://github.com/terraform-providers/terraform-provider-aws/issues/3273)) + +BUG FIXES: + +* data-source/aws_elb_service_account: Correct GovCloud region ([#3315](https://github.com/terraform-providers/terraform-provider-aws/issues/3315)) +* resource/aws_acm_certificate_validation: Prevent crash on `validation_record_fqdns` ([#3336](https://github.com/terraform-providers/terraform-provider-aws/issues/3336)) +* resource/aws_acm_certificate_validation: Fix `validation_record_fqdns` handling with combined root and wildcard requests ([#3366](https://github.com/terraform-providers/terraform-provider-aws/issues/3366)) +* resource/aws_autoscaling_policy: `cooldown` with zero value not set correctly ([#2809](https://github.com/terraform-providers/terraform-provider-aws/issues/2809)) +* resource/aws_cloudtrail: Now respects initial `include_global_service_events = false` ([#2817](https://github.com/terraform-providers/terraform-provider-aws/issues/2817)) +* resource/aws_dynamodb_table: Retry deletion on ResourceInUseException ([#3355](https://github.com/terraform-providers/terraform-provider-aws/issues/3355)) +* resource/aws_dx_lag: `number_of_connections` deprecated (made Optional). Omitting field may now prevent spurious diffs. ([#3367](https://github.com/terraform-providers/terraform-provider-aws/issues/3367)) +* resource/aws_ecs_service: Retry DescribeServices after creation ([#3387](https://github.com/terraform-providers/terraform-provider-aws/issues/3387)) +* resource/aws_ecs_service: Fix reading `load_balancer` into state ([#3502](https://github.com/terraform-providers/terraform-provider-aws/issues/3502)) +* resource/aws_elasticsearch_domain: Retry creation on `ValidationException` ([#3375](https://github.com/terraform-providers/terraform-provider-aws/issues/3375)) +* resource/aws_iam_user_ssh_key: Correctly set status after creation ([#3390](https://github.com/terraform-providers/terraform-provider-aws/issues/3390)) +* resource/aws_instance: Bump deletion timeout to 20mins ([#3452](https://github.com/terraform-providers/terraform-provider-aws/issues/3452)) +* resource/aws_kinesis_firehose_delivery_stream: Retry on additional IAM eventual consistency errors ([#3381](https://github.com/terraform-providers/terraform-provider-aws/issues/3381)) +* resource/aws_route53_record: Trim trailing dot during import ([#3321](https://github.com/terraform-providers/terraform-provider-aws/issues/3321)) +* resource/aws_s3_bucket: Prevent crashes on location and replication read retry timeouts ([#3338](https://github.com/terraform-providers/terraform-provider-aws/issues/3338)) +* resource/aws_s3_bucket: Always set replication_configuration in state ([#3349](https://github.com/terraform-providers/terraform-provider-aws/issues/3349)) +* resource/aws_security_group: Allow empty rule description ([#2846](https://github.com/terraform-providers/terraform-provider-aws/issues/2846)) +* resource/aws_sns_topic: Fix exit after updating first attribute ([#3360](https://github.com/terraform-providers/terraform-provider-aws/issues/3360)) +* resource/aws_spot_instance_request: Bump delete timeout to 20mins ([#3435](https://github.com/terraform-providers/terraform-provider-aws/issues/3435)) +* resource/aws_sqs_queue: Skip SQS ListQueueTags in aws-us-gov partition ([#3376](https://github.com/terraform-providers/terraform-provider-aws/issues/3376)) +* resource/aws_vpc_endpoint: Treat pending as expected state during deletion ([#3370](https://github.com/terraform-providers/terraform-provider-aws/issues/3370)) +* resource/aws_vpc_peering_connection: Treat `pending-acceptance` as expected during deletion ([#3393](https://github.com/terraform-providers/terraform-provider-aws/issues/3393)) +* resource/aws_cognito_user_pool_client: support `USER_PASSWORD_AUTH` for explicit_auth_flows ([#3417](https://github.com/terraform-providers/terraform-provider-aws/issues/3417)) + ## 1.9.0 (February 09, 2018) NOTES: * data-source/aws_region: `current` field is deprecated and the data source defaults to the provider region if no endpoint or name is specified ([#3157](https://github.com/terraform-providers/terraform-provider-aws/issues/3157)) +* data-source/aws_iam_policy_document: Statements are now de-duplicated per `Sid`s ([#2890](https://github.com/terraform-providers/terraform-provider-aws/issues/2890)) FEATURES: diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go index efd4b2300ef6..fa00b95a3321 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go @@ -18,6 +18,7 @@ import ( "github.com/aws/aws-sdk-go/service/acm" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/applicationautoscaling" + "github.com/aws/aws-sdk-go/service/appsync" "github.com/aws/aws-sdk-go/service/athena" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/batch" @@ -36,6 +37,7 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/aws/aws-sdk-go/service/dax" "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" @@ -148,6 +150,7 @@ type AWSClient struct { cognitoconn *cognitoidentity.CognitoIdentity cognitoidpconn *cognitoidentityprovider.CognitoIdentityProvider configconn *configservice.ConfigService + daxconn *dax.DAX devicefarmconn *devicefarm.DeviceFarm dmsconn *databasemigrationservice.DatabaseMigrationService dsconn *directoryservice.DirectoryService @@ -208,6 +211,7 @@ type AWSClient struct { athenaconn *athena.Athena dxconn *directconnect.DirectConnect mediastoreconn *mediastore.MediaStore + appsyncconn *appsync.AppSync } func (c *AWSClient) S3() *s3.S3 { @@ -413,8 +417,9 @@ func (c *Config) Client() (interface{}, error) { client.configconn = configservice.New(sess) client.cognitoconn = cognitoidentity.New(sess) client.cognitoidpconn = cognitoidentityprovider.New(sess) - client.dmsconn = databasemigrationservice.New(sess) client.codepipelineconn = codepipeline.New(sess) + client.daxconn = dax.New(awsDynamoSess) + client.dmsconn = databasemigrationservice.New(sess) client.dsconn = directoryservice.New(sess) client.dynamodbconn = dynamodb.New(awsDynamoSess) client.ecrconn = ecr.New(awsEcrSess) @@ -458,6 +463,7 @@ func (c *Config) Client() (interface{}, error) { client.athenaconn = athena.New(sess) client.dxconn = directconnect.New(sess) client.mediastoreconn = mediastore.New(sess) + client.appsyncconn = appsync.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go index 5d2da6747274..795b41bd6749 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elb_service_account.go @@ -23,7 +23,7 @@ var elbAccountIdPerRegionMap = map[string]string{ "sa-east-1": "507241528517", "us-east-1": "127311923021", "us-east-2": "033677994240", - "us-gov-west": "048591011584", + "us-gov-west-1": "048591011584", "us-west-1": "027434742980", "us-west-2": "797873946194", } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go new file mode 100644 index 000000000000..fb479bd5faab --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_inspector_rules_packages.go @@ -0,0 +1,56 @@ +package aws + +import ( + "errors" + "fmt" + "log" + "sort" + "time" + + "github.com/aws/aws-sdk-go/service/inspector" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsInspectorRulesPackages() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsInspectorRulesPackagesRead, + + Schema: map[string]*schema.Schema{ + "arns": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsInspectorRulesPackagesRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).inspectorconn + + log.Printf("[DEBUG] Reading Rules Packages.") + d.SetId(time.Now().UTC().String()) + + var arns []string + + input := &inspector.ListRulesPackagesInput{} + + err := conn.ListRulesPackagesPages(input, func(page *inspector.ListRulesPackagesOutput, lastPage bool) bool { + for _, arn := range page.RulesPackageArns { + arns = append(arns, *arn) + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("Error fetching Rules Packages: %s", err) + } + + if len(arns) == 0 { + return errors.New("No rules packages found.") + } + + sort.Strings(arns) + d.Set("arns", arns) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go index c3a437904f96..91dfacb7ee6d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kms" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" @@ -64,25 +64,27 @@ func dataSourceAwsKmsAliasRead(d *schema.ResourceData, meta interface{}) error { d.SetId(time.Now().UTC().String()) d.Set("arn", alias.AliasArn) - // Some aliases do not return TargetKeyId (e.g. aliases for AWS services or - // aliases not associated with a Customer Managed Key (CMK)) + // ListAliases can return an alias for an AWS service key (e.g. + // alias/aws/rds) without a TargetKeyId if the alias has not yet been + // used for the first time. In that situation, calling DescribeKey will + // associate an actual key with the alias, and the next call to + // ListAliases will have a TargetKeyId for the alias. + // + // For a simpler codepath, we always call DescribeKey with the alias + // name to get the target key's ARN and Id direct from AWS. + // // https://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html - if alias.TargetKeyId != nil { - aliasARN, err := arn.Parse(*alias.AliasArn) - if err != nil { - return err - } - targetKeyARN := arn.ARN{ - Partition: aliasARN.Partition, - Service: aliasARN.Service, - Region: aliasARN.Region, - AccountID: aliasARN.AccountID, - Resource: fmt.Sprintf("key/%s", *alias.TargetKeyId), - } - d.Set("target_key_arn", targetKeyARN.String()) - d.Set("target_key_id", alias.TargetKeyId) + req := &kms.DescribeKeyInput{ + KeyId: aws.String(target.(string)), } + resp, err := conn.DescribeKey(req) + if err != nil { + return errwrap.Wrapf("Error calling KMS DescribeKey: {{err}}", err) + } + + d.Set("target_key_arn", resp.KeyMetadata.Arn) + d.Set("target_key_id", resp.KeyMetadata.KeyId) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go index fb31a0b0a78f..81bd9ffc8775 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go @@ -200,6 +200,7 @@ func Provider() terraform.ResourceProvider { "aws_iam_server_certificate": dataSourceAwsIAMServerCertificate(), "aws_iam_user": dataSourceAwsIAMUser(), "aws_internet_gateway": dataSourceAwsInternetGateway(), + "aws_inspector_rules_packages": dataSourceAwsInspectorRulesPackages(), "aws_instance": dataSourceAwsInstance(), "aws_instances": dataSourceAwsInstances(), "aws_ip_ranges": dataSourceAwsIPRanges(), @@ -267,10 +268,12 @@ func Provider() terraform.ResourceProvider { "aws_api_gateway_stage": resourceAwsApiGatewayStage(), "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), + "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), + "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), "aws_athena_database": resourceAwsAthenaDatabase(), "aws_athena_named_query": resourceAwsAthenaNamedQuery(), "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), @@ -314,6 +317,7 @@ func Provider() terraform.ResourceProvider { "aws_codebuild_project": resourceAwsCodeBuildProject(), "aws_codepipeline": resourceAwsCodePipeline(), "aws_customer_gateway": resourceAwsCustomerGateway(), + "aws_dax_cluster": resourceAwsDaxCluster(), "aws_db_event_subscription": resourceAwsDbEventSubscription(), "aws_db_instance": resourceAwsDbInstance(), "aws_db_option_group": resourceAwsDbOptionGroup(), @@ -366,7 +370,9 @@ func Provider() terraform.ResourceProvider { "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), "aws_glacier_vault": resourceAwsGlacierVault(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), @@ -401,6 +407,7 @@ func Provider() terraform.ResourceProvider { "aws_internet_gateway": resourceAwsInternetGateway(), "aws_iot_certificate": resourceAwsIotCertificate(), "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing_type": resourceAwsIotThingType(), "aws_iot_topic_rule": resourceAwsIotTopicRule(), "aws_key_pair": resourceAwsKeyPair(), "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), @@ -470,6 +477,7 @@ func Provider() terraform.ResourceProvider { "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), @@ -480,6 +488,7 @@ func Provider() terraform.ResourceProvider { "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), "aws_s3_bucket_object": resourceAwsS3BucketObject(), "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), "aws_security_group": resourceAwsSecurityGroup(), "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), "aws_default_security_group": resourceAwsDefaultSecurityGroup(), @@ -554,6 +563,8 @@ func Provider() terraform.ResourceProvider { "aws_lb": resourceAwsLb(), "aws_alb_listener": resourceAwsLbListener(), "aws_lb_listener": resourceAwsLbListener(), + "aws_alb_listener_certificate": resourceAwsLbListenerCertificate(), + "aws_lb_listener_certificate": resourceAwsLbListenerCertificate(), "aws_alb_listener_rule": resourceAwsLbbListenerRule(), "aws_lb_listener_rule": resourceAwsLbbListenerRule(), "aws_alb_target_group": resourceAwsLbTargetGroup(), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go index f71367d61359..024b26897000 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go @@ -3,13 +3,12 @@ package aws import ( "fmt" "log" - "reflect" - "sort" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acm" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -59,7 +58,7 @@ func resourceAwsAcmCertificateValidationCreate(d *schema.ResourceData, meta inte } if validation_record_fqdns, ok := d.GetOk("validation_record_fqdns"); ok { - err := resourceAwsAcmCertificateCheckValidationRecords(validation_record_fqdns.(*schema.Set).List(), resp.Certificate) + err := resourceAwsAcmCertificateCheckValidationRecords(validation_record_fqdns.(*schema.Set).List(), resp.Certificate, acmconn) if err != nil { return err } @@ -83,28 +82,52 @@ func resourceAwsAcmCertificateValidationCreate(d *schema.ResourceData, meta inte }) } -func resourceAwsAcmCertificateCheckValidationRecords(validation_record_fqdns []interface{}, cert *acm.CertificateDetail) error { - expected_fqdns := make([]string, len(cert.DomainValidationOptions)) - for i, v := range cert.DomainValidationOptions { - if *v.ValidationMethod == acm.ValidationMethodDns { - expected_fqdns[i] = strings.TrimSuffix(*v.ResourceRecord.Name, ".") +func resourceAwsAcmCertificateCheckValidationRecords(validationRecordFqdns []interface{}, cert *acm.CertificateDetail, conn *acm.ACM) error { + expectedFqdns := make(map[string]*acm.DomainValidation) + + if len(cert.DomainValidationOptions) == 0 { + input := &acm.DescribeCertificateInput{ + CertificateArn: cert.CertificateArn, + } + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + log.Printf("[DEBUG] Certificate domain validation options empty for %q, retrying", cert.CertificateArn) + output, err := conn.DescribeCertificate(input) + if err != nil { + return resource.NonRetryableError(err) + } + if len(output.Certificate.DomainValidationOptions) == 0 { + return resource.RetryableError(fmt.Errorf("Certificate domain validation options empty for %s", *cert.CertificateArn)) + } + cert = output.Certificate + return nil + }) + if err != nil { + return err } } - - actual_validation_record_fqdns := make([]string, 0, len(validation_record_fqdns)) - - for _, v := range validation_record_fqdns { - val := v.(string) - actual_validation_record_fqdns = append(actual_validation_record_fqdns, strings.TrimSuffix(val, ".")) + for _, v := range cert.DomainValidationOptions { + if v.ValidationMethod != nil { + if *v.ValidationMethod != acm.ValidationMethodDns { + return fmt.Errorf("validation_record_fqdns is only valid for DNS validation") + } + newExpectedFqdn := strings.TrimSuffix(*v.ResourceRecord.Name, ".") + expectedFqdns[newExpectedFqdn] = v + } else if len(v.ValidationEmails) > 0 { + // ACM API sometimes is not sending ValidationMethod for EMAIL validation + return fmt.Errorf("validation_record_fqdns is only valid for DNS validation") + } } - sort.Strings(expected_fqdns) - sort.Strings(actual_validation_record_fqdns) - - log.Printf("[DEBUG] Checking validation_record_fqdns. Expected: %v, Actual: %v", expected_fqdns, actual_validation_record_fqdns) + for _, v := range validationRecordFqdns { + delete(expectedFqdns, strings.TrimSuffix(v.(string), ".")) + } - if !reflect.DeepEqual(expected_fqdns, actual_validation_record_fqdns) { - return fmt.Errorf("Certificate needs %v to be set but only %v was passed to validation_record_fqdns", expected_fqdns, actual_validation_record_fqdns) + if len(expectedFqdns) > 0 { + var errors error + for expectedFqdn, domainValidation := range expectedFqdns { + errors = multierror.Append(errors, fmt.Errorf("missing %s DNS validation record: %s", *domainValidation.DomainName, expectedFqdn)) + } + return errors } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go new file mode 100644 index 000000000000..8911e5dcbba1 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go @@ -0,0 +1,205 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsApiGatewayVpcLink() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsApiGatewayVpcLinkCreate, + Read: resourceAwsApiGatewayVpcLinkRead, + Update: resourceAwsApiGatewayVpcLinkUpdate, + Delete: resourceAwsApiGatewayVpcLinkDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "target_arns": { + Type: schema.TypeSet, + MaxItems: 1, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsApiGatewayVpcLinkCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + + input := &apigateway.CreateVpcLinkInput{ + Name: aws.String(d.Get("name").(string)), + TargetArns: expandStringList(d.Get("target_arns").(*schema.Set).List()), + } + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + resp, err := conn.CreateVpcLink(input) + if err != nil { + return err + } + + d.SetId(*resp.Id) + + stateConf := &resource.StateChangeConf{ + Pending: []string{apigateway.VpcLinkStatusPending}, + Target: []string{apigateway.VpcLinkStatusAvailable}, + Refresh: apigatewayVpcLinkRefreshStatusFunc(conn, *resp.Id), + Timeout: 8 * time.Minute, + MinTimeout: 3 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + d.SetId("") + return fmt.Errorf("[WARN] Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) + } + + return nil +} + +func resourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + + input := &apigateway.GetVpcLinkInput{ + VpcLinkId: aws.String(d.Id()), + } + + resp, err := conn.GetVpcLink(input) + if err != nil { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + log.Printf("[WARN] VPC Link %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("name", resp.Name) + d.Set("description", resp.Description) + d.Set("target_arn", flattenStringList(resp.TargetArns)) + return nil +} + +func resourceAwsApiGatewayVpcLinkUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + + operations := make([]*apigateway.PatchOperation, 0) + + if d.HasChange("name") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/name"), + Value: aws.String(d.Get("name").(string)), + }) + } + + if d.HasChange("description") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/description"), + Value: aws.String(d.Get("description").(string)), + }) + } + + input := &apigateway.UpdateVpcLinkInput{ + VpcLinkId: aws.String(d.Id()), + PatchOperations: operations, + } + + _, err := conn.UpdateVpcLink(input) + if err != nil { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + log.Printf("[WARN] VPC Link %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{apigateway.VpcLinkStatusPending}, + Target: []string{apigateway.VpcLinkStatusAvailable}, + Refresh: apigatewayVpcLinkRefreshStatusFunc(conn, d.Id()), + Timeout: 8 * time.Minute, + MinTimeout: 3 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("[WARN] Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) + } + + return nil +} + +func resourceAwsApiGatewayVpcLinkDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + + input := &apigateway.DeleteVpcLinkInput{ + VpcLinkId: aws.String(d.Id()), + } + + _, err := conn.DeleteVpcLink(input) + if err != nil { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + return nil + } + return err + } + + stateConf := resource.StateChangeConf{ + Pending: []string{apigateway.VpcLinkStatusPending, + apigateway.VpcLinkStatusAvailable, + apigateway.VpcLinkStatusDeleting}, + Target: []string{""}, + Timeout: 5 * time.Minute, + MinTimeout: 1 * time.Second, + Refresh: func() (interface{}, string, error) { + resp, err := conn.GetVpcLink(&apigateway.GetVpcLinkInput{ + VpcLinkId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + return 1, "", nil + } + return nil, "failed", err + } + return resp, *resp.Status, nil + }, + } + + if _, err := stateConf.WaitForState(); err != nil { + return err + } + + return nil +} + +func apigatewayVpcLinkRefreshStatusFunc(conn *apigateway.APIGateway, vl string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &apigateway.GetVpcLinkInput{ + VpcLinkId: aws.String(vl), + } + resp, err := conn.GetVpcLink(input) + if err != nil { + return nil, "failed", err + } + return resp, *resp.Status, nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go new file mode 100644 index 000000000000..0031c65b6147 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go @@ -0,0 +1,195 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appsync" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAppsyncGraphqlApi() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAppsyncGraphqlApiCreate, + Read: resourceAwsAppsyncGraphqlApiRead, + Update: resourceAwsAppsyncGraphqlApiUpdate, + Delete: resourceAwsAppsyncGraphqlApiDelete, + + Schema: map[string]*schema.Schema{ + "authentication_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + appsync.AuthenticationTypeApiKey, + appsync.AuthenticationTypeAwsIam, + appsync.AuthenticationTypeAmazonCognitoUserPools, + }, false), + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`[_A-Za-z][_0-9A-Za-z]*`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q must match [_A-Za-z][_0-9A-Za-z]*", k)) + } + return + }, + }, + "user_pool_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "app_id_client_regex": { + Type: schema.TypeString, + Optional: true, + }, + "aws_region": { + Type: schema.TypeString, + Required: true, + }, + "default_action": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + appsync.DefaultActionAllow, + appsync.DefaultActionDeny, + }, false), + }, + "user_pool_id": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsAppsyncGraphqlApiCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.CreateGraphqlApiInput{ + AuthenticationType: aws.String(d.Get("authentication_type").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("user_pool_config"); ok { + input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{})) + } + + resp, err := conn.CreateGraphqlApi(input) + if err != nil { + return err + } + + d.SetId(*resp.GraphqlApi.ApiId) + d.Set("arn", resp.GraphqlApi.Arn) + return nil +} + +func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.GetGraphqlApiInput{ + ApiId: aws.String(d.Id()), + } + + resp, err := conn.GetGraphqlApi(input) + if err != nil { + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + log.Printf("[WARN] No such entity found for Appsync Graphql API (%s)", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("authentication_type", resp.GraphqlApi.AuthenticationType) + d.Set("name", resp.GraphqlApi.Name) + d.Set("user_pool_config", flattenAppsyncGraphqlApiUserPoolConfig(resp.GraphqlApi.UserPoolConfig)) + d.Set("arn", resp.GraphqlApi.Arn) + return nil +} + +func resourceAwsAppsyncGraphqlApiUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.UpdateGraphqlApiInput{ + ApiId: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + } + + if d.HasChange("authentication_type") { + input.AuthenticationType = aws.String(d.Get("authentication_type").(string)) + } + if d.HasChange("user_pool_config") { + input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(d.Get("user_pool_config").([]interface{})) + } + + _, err := conn.UpdateGraphqlApi(input) + if err != nil { + return err + } + + return resourceAwsAppsyncGraphqlApiRead(d, meta) +} + +func resourceAwsAppsyncGraphqlApiDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.DeleteGraphqlApiInput{ + ApiId: aws.String(d.Id()), + } + _, err := conn.DeleteGraphqlApi(input) + if err != nil { + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func expandAppsyncGraphqlApiUserPoolConfig(config []interface{}) *appsync.UserPoolConfig { + if len(config) < 1 { + return nil + } + cg := config[0].(map[string]interface{}) + upc := &appsync.UserPoolConfig{ + AwsRegion: aws.String(cg["aws_region"].(string)), + DefaultAction: aws.String(cg["default_action"].(string)), + UserPoolId: aws.String(cg["user_pool_id"].(string)), + } + if v, ok := cg["app_id_client_regex"].(string); ok && v != "" { + upc.AppIdClientRegex = aws.String(v) + } + return upc +} + +func flattenAppsyncGraphqlApiUserPoolConfig(upc *appsync.UserPoolConfig) []interface{} { + if upc == nil { + return []interface{}{} + } + m := make(map[string]interface{}, 1) + + m["aws_region"] = *upc.AwsRegion + m["default_action"] = *upc.DefaultAction + m["user_pool_id"] = *upc.UserPoolId + if upc.AppIdClientRegex != nil { + m["app_id_client_regex"] = *upc.AppIdClientRegex + } + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go index 9ebf33b693fe..303c863b1794 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsAutoscalingPolicy() *schema.Resource { @@ -31,7 +32,7 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { }, "adjustment_type": &schema.Schema{ Type: schema.TypeString, - Required: true, + Optional: true, }, "autoscaling_group_name": &schema.Schema{ Type: schema.TypeString, @@ -57,8 +58,9 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { Computed: true, }, "min_adjustment_magnitude": &schema.Schema{ - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(1), }, "min_adjustment_step": &schema.Schema{ Type: schema.TypeInt, @@ -93,6 +95,84 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { }, Set: resourceAwsAutoscalingScalingAdjustmentHash, }, + "target_tracking_configuration": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "predefined_metric_specification": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"target_tracking_configuration.0.customized_metric_specification"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "predefined_metric_type": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "resource_label": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "customized_metric_specification": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"target_tracking_configuration.0.predefined_metric_specification"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "metric_dimension": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "value": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "metric_name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "namespace": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "statistic": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "unit": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "target_value": &schema.Schema{ + Type: schema.TypeFloat, + Required: true, + }, + "disable_scale_in": &schema.Schema{ + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + }, + }, }, } } @@ -147,6 +227,7 @@ func resourceAwsAutoscalingPolicyRead(d *schema.ResourceData, meta interface{}) d.Set("name", p.PolicyName) d.Set("scaling_adjustment", p.ScalingAdjustment) d.Set("step_adjustment", flattenStepAdjustments(p.StepAdjustments)) + d.Set("target_tracking_configuration", flattenTargetTrackingConfiguration(p.TargetTrackingConfiguration)) return nil } @@ -204,11 +285,11 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling params.AdjustmentType = aws.String(v.(string)) } - if v, ok := d.GetOk("cooldown"); ok { + if v, ok := d.GetOkExists("cooldown"); ok { params.Cooldown = aws.Int64(int64(v.(int))) } - if v, ok := d.GetOk("estimated_instance_warmup"); ok { + if v, ok := d.GetOkExists("estimated_instance_warmup"); ok { params.EstimatedInstanceWarmup = aws.Int64(int64(v.(int))) } @@ -221,7 +302,7 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling } //if policy_type=="SimpleScaling" then scaling_adjustment is required and 0 is allowed - if v, ok := d.GetOk("scaling_adjustment"); ok || *params.PolicyType == "SimpleScaling" { + if v, ok := d.GetOkExists("scaling_adjustment"); ok || *params.PolicyType == "SimpleScaling" { params.ScalingAdjustment = aws.Int64(int64(v.(int))) } @@ -233,14 +314,18 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling params.StepAdjustments = steps } - if v, ok := d.GetOk("min_adjustment_magnitude"); ok { + if v, ok := d.GetOkExists("min_adjustment_magnitude"); ok { // params.MinAdjustmentMagnitude = aws.Int64(int64(d.Get("min_adjustment_magnitude").(int))) params.MinAdjustmentMagnitude = aws.Int64(int64(v.(int))) - } else if v, ok := d.GetOk("min_adjustment_step"); ok { + } else if v, ok := d.GetOkExists("min_adjustment_step"); ok { // params.MinAdjustmentStep = aws.Int64(int64(d.Get("min_adjustment_step").(int))) params.MinAdjustmentStep = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("target_tracking_configuration"); ok { + params.TargetTrackingConfiguration = expandTargetTrackingConfiguration(v.([]interface{})) + } + // Validate our final input to confirm it won't error when sent to AWS. // First, SimpleScaling policy types... if *params.PolicyType == "SimpleScaling" && params.StepAdjustments != nil { @@ -252,6 +337,9 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling if *params.PolicyType == "SimpleScaling" && params.EstimatedInstanceWarmup != nil { return params, fmt.Errorf("SimpleScaling policy types cannot use estimated_instance_warmup!") } + if *params.PolicyType == "SimpleScaling" && params.TargetTrackingConfiguration != nil { + return params, fmt.Errorf("SimpleScaling policy types cannot use target_tracking_configuration!") + } // Second, StepScaling policy types... if *params.PolicyType == "StepScaling" && params.ScalingAdjustment != nil { @@ -260,6 +348,29 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling if *params.PolicyType == "StepScaling" && params.Cooldown != nil { return params, fmt.Errorf("StepScaling policy types cannot use cooldown!") } + if *params.PolicyType == "StepScaling" && params.TargetTrackingConfiguration != nil { + return params, fmt.Errorf("StepScaling policy types cannot use target_tracking_configuration!") + } + + // Third, TargetTrackingScaling policy types... + if *params.PolicyType == "TargetTrackingScaling" && params.AdjustmentType != nil { + return params, fmt.Errorf("TargetTrackingScaling policy types cannot use adjustment_type!") + } + if *params.PolicyType == "TargetTrackingScaling" && params.Cooldown != nil { + return params, fmt.Errorf("TargetTrackingScaling policy types cannot use cooldown!") + } + if *params.PolicyType == "TargetTrackingScaling" && params.MetricAggregationType != nil { + return params, fmt.Errorf("TargetTrackingScaling policy types cannot use metric_aggregation_type!") + } + if *params.PolicyType == "TargetTrackingScaling" && params.MinAdjustmentMagnitude != nil { + return params, fmt.Errorf("TargetTrackingScaling policy types cannot use min_adjustment_magnitude!") + } + if *params.PolicyType == "TargetTrackingScaling" && params.ScalingAdjustment != nil { + return params, fmt.Errorf("TargetTrackingScaling policy types cannot use scaling_adjustment!") + } + if *params.PolicyType == "TargetTrackingScaling" && params.StepAdjustments != nil { + return params, fmt.Errorf("TargetTrackingScaling policy types cannot use step_adjustments!") + } return params, nil } @@ -310,3 +421,94 @@ func resourceAwsAutoscalingScalingAdjustmentHash(v interface{}) int { return hashcode.String(buf.String()) } + +func expandTargetTrackingConfiguration(configs []interface{}) *autoscaling.TargetTrackingConfiguration { + if len(configs) < 1 { + return nil + } + + config := configs[0].(map[string]interface{}) + + result := &autoscaling.TargetTrackingConfiguration{} + + result.TargetValue = aws.Float64(config["target_value"].(float64)) + if v, ok := config["disable_scale_in"]; ok { + result.DisableScaleIn = aws.Bool(v.(bool)) + } + if v, ok := config["predefined_metric_specification"]; ok && len(v.([]interface{})) > 0 { + spec := v.([]interface{})[0].(map[string]interface{}) + predSpec := &autoscaling.PredefinedMetricSpecification{ + PredefinedMetricType: aws.String(spec["predefined_metric_type"].(string)), + } + if val, ok := spec["resource_label"]; ok && val.(string) != "" { + predSpec.ResourceLabel = aws.String(val.(string)) + } + result.PredefinedMetricSpecification = predSpec + } + if v, ok := config["customized_metric_specification"]; ok && len(v.([]interface{})) > 0 { + spec := v.([]interface{})[0].(map[string]interface{}) + customSpec := &autoscaling.CustomizedMetricSpecification{ + Namespace: aws.String(spec["namespace"].(string)), + MetricName: aws.String(spec["metric_name"].(string)), + Statistic: aws.String(spec["statistic"].(string)), + } + if val, ok := spec["unit"]; ok { + customSpec.Unit = aws.String(val.(string)) + } + if val, ok := spec["metric_dimension"]; ok { + dims := val.([]interface{}) + metDimList := make([]*autoscaling.MetricDimension, len(dims)) + for i := range metDimList { + dim := dims[i].(map[string]interface{}) + md := &autoscaling.MetricDimension{ + Name: aws.String(dim["name"].(string)), + Value: aws.String(dim["value"].(string)), + } + metDimList[i] = md + } + customSpec.Dimensions = metDimList + } + result.CustomizedMetricSpecification = customSpec + } + return result +} + +func flattenTargetTrackingConfiguration(config *autoscaling.TargetTrackingConfiguration) []interface{} { + if config == nil { + return []interface{}{} + } + + result := map[string]interface{}{} + result["disable_scale_in"] = *config.DisableScaleIn + result["target_value"] = *config.TargetValue + if config.PredefinedMetricSpecification != nil { + spec := map[string]interface{}{} + spec["predefined_metric_type"] = *config.PredefinedMetricSpecification.PredefinedMetricType + if config.PredefinedMetricSpecification.ResourceLabel != nil { + spec["resource_label"] = *config.PredefinedMetricSpecification.ResourceLabel + } + result["predefined_metric_specification"] = []map[string]interface{}{spec} + } + if config.CustomizedMetricSpecification != nil { + spec := map[string]interface{}{} + spec["metric_name"] = *config.CustomizedMetricSpecification.MetricName + spec["namespace"] = *config.CustomizedMetricSpecification.Namespace + spec["statistic"] = *config.CustomizedMetricSpecification.Statistic + if config.CustomizedMetricSpecification.Unit != nil { + spec["unit"] = *config.CustomizedMetricSpecification.Unit + } + if config.CustomizedMetricSpecification.Dimensions != nil { + dimSpec := make([]interface{}, len(config.CustomizedMetricSpecification.Dimensions)) + for i := range dimSpec { + dim := map[string]interface{}{} + rawDim := config.CustomizedMetricSpecification.Dimensions[i] + dim["name"] = *rawDim.Name + dim["value"] = *rawDim.Value + dimSpec[i] = dim + } + spec["metric_dimension"] = dimSpec + } + result["customized_metric_specification"] = []map[string]interface{}{spec} + } + return []interface{}{result} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go index 5e347b8d1564..ded9e0be917c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudtrail.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudtrail" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudTrail() *schema.Resource { @@ -72,6 +73,51 @@ func resourceAwsCloudTrail() *schema.Resource { Optional: true, ValidateFunc: validateArn, }, + "event_selector": { + Type: schema.TypeList, + Optional: true, + MaxItems: 5, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "read_write_type": { + Type: schema.TypeString, + Optional: true, + Default: cloudtrail.ReadWriteTypeAll, + ValidateFunc: validation.StringInSlice([]string{ + cloudtrail.ReadWriteTypeAll, + cloudtrail.ReadWriteTypeReadOnly, + cloudtrail.ReadWriteTypeWriteOnly, + }, false), + }, + + "include_management_events": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + + "data_resource": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"AWS::S3::Object", "AWS::Lambda::Function"}, false), + }, + "values": { + Type: schema.TypeList, + Required: true, + MaxItems: 250, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + }, + }, + }, "home_region": { Type: schema.TypeString, Computed: true, @@ -99,7 +145,7 @@ func resourceAwsCloudTrailCreate(d *schema.ResourceData, meta interface{}) error if v, ok := d.GetOk("cloud_watch_logs_role_arn"); ok { input.CloudWatchLogsRoleArn = aws.String(v.(string)) } - if v, ok := d.GetOk("include_global_service_events"); ok { + if v, ok := d.GetOkExists("include_global_service_events"); ok { input.IncludeGlobalServiceEvents = aws.Bool(v.(bool)) } if v, ok := d.GetOk("is_multi_region_trail"); ok { @@ -150,6 +196,13 @@ func resourceAwsCloudTrailCreate(d *schema.ResourceData, meta interface{}) error } } + // Event Selectors + if _, ok := d.GetOk("event_selector"); ok { + if err := cloudTrailSetEventSelectors(conn, d); err != nil { + return err + } + } + return resourceAwsCloudTrailUpdate(d, meta) } @@ -227,6 +280,18 @@ func resourceAwsCloudTrailRead(d *schema.ResourceData, meta interface{}) error { } d.Set("enable_logging", logstatus) + // Get EventSelectors + eventSelectorsOut, err := conn.GetEventSelectors(&cloudtrail.GetEventSelectorsInput{ + TrailName: aws.String(d.Id()), + }) + if err != nil { + return err + } + + if err := d.Set("event_selector", flattenAwsCloudTrailEventSelector(eventSelectorsOut.EventSelectors)); err != nil { + return err + } + return nil } @@ -300,6 +365,13 @@ func resourceAwsCloudTrailUpdate(d *schema.ResourceData, meta interface{}) error } } + if !d.IsNewResource() && d.HasChange("event_selector") { + log.Printf("[DEBUG] Updating event selector on CloudTrail: %s", input) + if err := cloudTrailSetEventSelectors(conn, d); err != nil { + return err + } + } + log.Printf("[DEBUG] CloudTrail updated: %s", t) return resourceAwsCloudTrailRead(d, meta) @@ -357,3 +429,98 @@ func cloudTrailSetLogging(conn *cloudtrail.CloudTrail, enabled bool, id string) return nil } + +func cloudTrailSetEventSelectors(conn *cloudtrail.CloudTrail, d *schema.ResourceData) error { + input := &cloudtrail.PutEventSelectorsInput{ + TrailName: aws.String(d.Id()), + } + + eventSelectors := expandAwsCloudTrailEventSelector(d.Get("event_selector").([]interface{})) + input.EventSelectors = eventSelectors + + if err := input.Validate(); err != nil { + return fmt.Errorf("Error validate CloudTrail (%s): %s", d.Id(), err) + } + + _, err := conn.PutEventSelectors(input) + if err != nil { + return fmt.Errorf("Error set event selector on CloudTrail (%s): %s", d.Id(), err) + } + + return nil +} + +func expandAwsCloudTrailEventSelector(configured []interface{}) []*cloudtrail.EventSelector { + eventSelectors := make([]*cloudtrail.EventSelector, 0, len(configured)) + + for _, raw := range configured { + data := raw.(map[string]interface{}) + dataResources := expandAwsCloudTrailEventSelectorDataResource(data["data_resource"].([]interface{})) + + es := &cloudtrail.EventSelector{ + IncludeManagementEvents: aws.Bool(data["include_management_events"].(bool)), + ReadWriteType: aws.String(data["read_write_type"].(string)), + DataResources: dataResources, + } + eventSelectors = append(eventSelectors, es) + } + + return eventSelectors +} + +func expandAwsCloudTrailEventSelectorDataResource(configured []interface{}) []*cloudtrail.DataResource { + dataResources := make([]*cloudtrail.DataResource, 0, len(configured)) + + for _, raw := range configured { + data := raw.(map[string]interface{}) + + values := make([]*string, len(data["values"].([]interface{}))) + for i, vv := range data["values"].([]interface{}) { + str := vv.(string) + values[i] = aws.String(str) + } + + dataResource := &cloudtrail.DataResource{ + Type: aws.String(data["type"].(string)), + Values: values, + } + + dataResources = append(dataResources, dataResource) + } + + return dataResources +} + +func flattenAwsCloudTrailEventSelector(configured []*cloudtrail.EventSelector) []map[string]interface{} { + eventSelectors := make([]map[string]interface{}, 0, len(configured)) + + // Prevent default configurations shows differences + if len(configured) == 1 && len(configured[0].DataResources) == 0 { + return eventSelectors + } + + for _, raw := range configured { + item := make(map[string]interface{}) + item["read_write_type"] = *raw.ReadWriteType + item["include_management_events"] = *raw.IncludeManagementEvents + item["data_resource"] = flattenAwsCloudTrailEventSelectorDataResource(raw.DataResources) + + eventSelectors = append(eventSelectors, item) + } + + return eventSelectors +} + +func flattenAwsCloudTrailEventSelectorDataResource(configured []*cloudtrail.DataResource) []map[string]interface{} { + dataResources := make([]map[string]interface{}, 0, len(configured)) + + for _, raw := range configured { + item := make(map[string]interface{}) + item["type"] = *raw.Type + item["values"] = flattenStringList(raw.Values) + + dataResources = append(dataResources, item) + } + + return dataResources +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go index 8539022836ad..eb6afb70b6d9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go @@ -181,6 +181,33 @@ func resourceAwsCodeBuildProject() *schema.Resource { ValidateFunc: validateAwsCodeBuildTimeout, }, "tags": tagsSchema(), + "vpc_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "vpc_id": { + Type: schema.TypeString, + Required: true, + }, + "subnets": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + // Set: schema.HashString, + MaxItems: 16, + }, + "security_group_ids": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + // Set: schema.HashString, + MaxItems: 5, + }, + }, + }, + }, }, } } @@ -215,6 +242,10 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) params.TimeoutInMinutes = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("vpc_config"); ok { + params.VpcConfig = expandCodeBuildVpcConfig(v.([]interface{})) + } + if v, ok := d.GetOk("tags"); ok { params.Tags = tagsFromMapCodeBuild(v.(map[string]interface{})) } @@ -230,6 +261,10 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) return resource.RetryableError(err) } + if isAWSErr(err, "InvalidInputException", "Not authorized to perform DescribeSecurityGroups") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } @@ -326,6 +361,21 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm return projectEnv } +func expandCodeBuildVpcConfig(rawVpcConfig []interface{}) *codebuild.VpcConfig { + vpcConfig := codebuild.VpcConfig{} + if len(rawVpcConfig) == 0 { + return &vpcConfig + } else { + + data := rawVpcConfig[0].(map[string]interface{}) + vpcConfig.VpcId = aws.String(data["vpc_id"].(string)) + vpcConfig.Subnets = expandStringList(data["subnets"].(*schema.Set).List()) + vpcConfig.SecurityGroupIds = expandStringList(data["security_group_ids"].(*schema.Set).List()) + + return &vpcConfig + } +} + func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { configs := d.Get("source").(*schema.Set).List() projectSource := codebuild.ProjectSource{} @@ -380,15 +430,19 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e project := resp.Projects[0] - if err := d.Set("artifacts", flattenAwsCodebuildProjectArtifacts(project.Artifacts)); err != nil { + if err := d.Set("artifacts", flattenAwsCodeBuildProjectArtifacts(project.Artifacts)); err != nil { + return err + } + + if err := d.Set("environment", schema.NewSet(resourceAwsCodeBuildProjectEnvironmentHash, flattenAwsCodeBuildProjectEnvironment(project.Environment))); err != nil { return err } - if err := d.Set("environment", schema.NewSet(resourceAwsCodeBuildProjectEnvironmentHash, flattenAwsCodebuildProjectEnvironment(project.Environment))); err != nil { + if err := d.Set("source", flattenAwsCodeBuildProjectSource(project.Source)); err != nil { return err } - if err := d.Set("source", flattenAwsCodebuildProjectSource(project.Source)); err != nil { + if err := d.Set("vpc_config", flattenAwsCodeBuildVpcConfig(project.VpcConfig)); err != nil { return err } @@ -427,6 +481,10 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) params.Artifacts = &projectArtifacts } + if d.HasChange("vpc_config") { + params.VpcConfig = expandCodeBuildVpcConfig(d.Get("vpc_config").([]interface{})) + } + if d.HasChange("description") { params.Description = aws.String(d.Get("description").(string)) } @@ -474,7 +532,7 @@ func resourceAwsCodeBuildProjectDelete(d *schema.ResourceData, meta interface{}) return nil } -func flattenAwsCodebuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) *schema.Set { +func flattenAwsCodeBuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) *schema.Set { artifactSet := schema.Set{ F: resourceAwsCodeBuildProjectArtifactsHash, @@ -509,7 +567,7 @@ func flattenAwsCodebuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) return &artifactSet } -func flattenAwsCodebuildProjectEnvironment(environment *codebuild.ProjectEnvironment) []interface{} { +func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnvironment) []interface{} { envConfig := map[string]interface{}{} envConfig["type"] = *environment.Type @@ -525,7 +583,7 @@ func flattenAwsCodebuildProjectEnvironment(environment *codebuild.ProjectEnviron } -func flattenAwsCodebuildProjectSource(source *codebuild.ProjectSource) []interface{} { +func flattenAwsCodeBuildProjectSource(source *codebuild.ProjectSource) []interface{} { l := make([]interface{}, 1) m := map[string]interface{}{} @@ -548,6 +606,19 @@ func flattenAwsCodebuildProjectSource(source *codebuild.ProjectSource) []interfa return l } +func flattenAwsCodeBuildVpcConfig(vpcConfig *codebuild.VpcConfig) []interface{} { + if vpcConfig != nil { + values := map[string]interface{}{} + + values["vpc_id"] = *vpcConfig.VpcId + values["subnets"] = schema.NewSet(schema.HashString, flattenStringList(vpcConfig.Subnets)) + values["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SecurityGroupIds)) + + return []interface{}{values} + } + return nil +} + func resourceAwsCodeBuildProjectArtifactsHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go index a45ae20948bf..30af3ecc1d3c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go @@ -1106,9 +1106,11 @@ func validateTriggerEvent(v interface{}, k string) (ws []string, errors []error) "DeploymentSuccess": true, "DeploymentFailure": true, "DeploymentRollback": true, + "DeploymentReady": true, "InstanceStart": true, "InstanceSuccess": true, "InstanceFailure": true, + "InstanceReady": true, } if !triggerEvents[value] { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go index dad4a1312e4c..e848774c8b2c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go @@ -53,6 +53,7 @@ func resourceAwsCognitoUserPoolClient() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ cognitoidentityprovider.ExplicitAuthFlowsTypeAdminNoSrpAuth, cognitoidentityprovider.ExplicitAuthFlowsTypeCustomAuthFlowOnly, + cognitoidentityprovider.ExplicitAuthFlowsTypeUserPasswordAuth, }, false), }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go new file mode 100644 index 000000000000..0acf9a86e87d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go @@ -0,0 +1,588 @@ +package aws + +import ( + "fmt" + "log" + "sort" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDaxCluster() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDaxClusterCreate, + Read: resourceAwsDaxClusterRead, + Update: resourceAwsDaxClusterUpdate, + Delete: resourceAwsDaxClusterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(45 * time.Minute), + Delete: schema.DefaultTimeout(45 * time.Minute), + Update: schema.DefaultTimeout(90 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + StateFunc: func(val interface{}) string { + return strings.ToLower(val.(string)) + }, + // DAX follows the same naming convention as ElastiCache clusters + ValidateFunc: validateElastiCacheClusterId, + }, + "iam_role_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "node_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "replication_factor": { + Type: schema.TypeInt, + Required: true, + }, + "availability_zones": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "notification_topic_arn": { + Type: schema.TypeString, + Optional: true, + }, + "parameter_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "maintenance_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + StateFunc: func(val interface{}) string { + return strings.ToLower(val.(string)) + }, + ValidateFunc: validateOnceAWeekWindowFormat, + }, + "security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "subnet_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tags": tagsSchema(), + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "configuration_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_address": { + Type: schema.TypeString, + Computed: true, + }, + "nodes": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "address": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "availability_zone": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsDaxClusterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + clusterName := d.Get("cluster_name").(string) + iamRoleArn := d.Get("iam_role_arn").(string) + nodeType := d.Get("node_type").(string) + numNodes := int64(d.Get("replication_factor").(int)) + subnetGroupName := d.Get("subnet_group_name").(string) + securityIdSet := d.Get("security_group_ids").(*schema.Set) + + securityIds := expandStringList(securityIdSet.List()) + tags := tagsFromMapDax(d.Get("tags").(map[string]interface{})) + + req := &dax.CreateClusterInput{ + ClusterName: aws.String(clusterName), + IamRoleArn: aws.String(iamRoleArn), + NodeType: aws.String(nodeType), + ReplicationFactor: aws.Int64(numNodes), + SecurityGroupIds: securityIds, + SubnetGroupName: aws.String(subnetGroupName), + Tags: tags, + } + + // optionals can be defaulted by AWS + if v, ok := d.GetOk("description"); ok { + req.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("parameter_group_name"); ok { + req.ParameterGroupName = aws.String(v.(string)) + } + + if v, ok := d.GetOk("maintenance_window"); ok { + req.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("notification_topic_arn"); ok { + req.NotificationTopicArn = aws.String(v.(string)) + } + + preferred_azs := d.Get("availability_zones").(*schema.Set).List() + if len(preferred_azs) > 0 { + azs := expandStringList(preferred_azs) + req.AvailabilityZones = azs + } + + // IAM roles take some time to propagate + var resp *dax.CreateClusterOutput + err := resource.Retry(30*time.Second, func() *resource.RetryError { + var err error + resp, err = conn.CreateCluster(req) + if err != nil { + if isAWSErr(err, dax.ErrCodeInvalidParameterValueException, "No permission to assume role") { + log.Print("[DEBUG] Retrying create of DAX cluster") + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error creating DAX cluster: %s", err) + } + + // Assign the cluster id as the resource ID + // DAX always retains the id in lower case, so we have to + // mimic that or else we won't be able to refresh a resource whose + // name contained uppercase characters. + d.SetId(strings.ToLower(*resp.Cluster.ClusterName)) + + pending := []string{"creating", "modifying"} + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: []string{"available"}, + Refresh: daxClusterStateRefreshFunc(conn, d.Id(), "available", pending), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + log.Printf("[DEBUG] Waiting for state to become available: %v", d.Id()) + _, sterr := stateConf.WaitForState() + if sterr != nil { + return fmt.Errorf("Error waiting for DAX cluster (%s) to be created: %s", d.Id(), sterr) + } + + return resourceAwsDaxClusterRead(d, meta) +} + +func resourceAwsDaxClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + req := &dax.DescribeClustersInput{ + ClusterNames: []*string{aws.String(d.Id())}, + } + + res, err := conn.DescribeClusters(req) + if err != nil { + if isAWSErr(err, dax.ErrCodeClusterNotFoundFault, "") { + log.Printf("[WARN] DAX cluster (%s) not found", d.Id()) + d.SetId("") + return nil + } + + return err + } + + if len(res.Clusters) == 0 { + log.Printf("[WARN] DAX cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + c := res.Clusters[0] + d.Set("arn", c.ClusterArn) + d.Set("cluster_name", c.ClusterName) + d.Set("description", c.Description) + d.Set("iam_role_arn", c.IamRoleArn) + d.Set("node_type", c.NodeType) + d.Set("replication_factor", c.TotalNodes) + + if c.ClusterDiscoveryEndpoint != nil { + d.Set("port", c.ClusterDiscoveryEndpoint.Port) + d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *c.ClusterDiscoveryEndpoint.Address, *c.ClusterDiscoveryEndpoint.Port))) + d.Set("cluster_address", aws.String(fmt.Sprintf("%s", *c.ClusterDiscoveryEndpoint.Address))) + } + + d.Set("subnet_group_name", c.SubnetGroup) + d.Set("security_group_ids", flattenDaxSecurityGroupIds(c.SecurityGroups)) + + if c.ParameterGroup != nil { + d.Set("parameter_group_name", c.ParameterGroup.ParameterGroupName) + } + + d.Set("maintenance_window", c.PreferredMaintenanceWindow) + + if c.NotificationConfiguration != nil { + if *c.NotificationConfiguration.TopicStatus == "active" { + d.Set("notification_topic_arn", c.NotificationConfiguration.TopicArn) + } + } + + if err := setDaxClusterNodeData(d, c); err != nil { + return err + } + + // list tags for resource + // set tags + arn, err := buildDaxArn(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) + if err != nil { + log.Printf("[DEBUG] Error building ARN for DAX Cluster, not setting Tags for cluster %s", *c.ClusterName) + } else { + resp, err := conn.ListTags(&dax.ListTagsInput{ + ResourceName: aws.String(arn), + }) + + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } + + var dt []*dax.Tag + if len(resp.Tags) > 0 { + dt = resp.Tags + } + d.Set("tags", tagsToMapDax(dt)) + } + + return nil +} + +func resourceAwsDaxClusterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + arn, err := buildDaxArn(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) + if err != nil { + log.Printf("[DEBUG] Error building ARN for DAX Cluster, not updating Tags for cluster %s", d.Id()) + } else { + if err := setTagsDax(conn, d, arn); err != nil { + return err + } + } + + req := &dax.UpdateClusterInput{ + ClusterName: aws.String(d.Id()), + } + + requestUpdate := false + awaitUpdate := false + if d.HasChange("description") { + req.Description = aws.String(d.Get("description").(string)) + requestUpdate = true + } + + if d.HasChange("security_group_ids") { + if attr := d.Get("security_group_ids").(*schema.Set); attr.Len() > 0 { + req.SecurityGroupIds = expandStringList(attr.List()) + requestUpdate = true + } + } + + if d.HasChange("parameter_group_name") { + req.ParameterGroupName = aws.String(d.Get("parameter_group_name").(string)) + requestUpdate = true + } + + if d.HasChange("maintenance_window") { + req.PreferredMaintenanceWindow = aws.String(d.Get("maintenance_window").(string)) + requestUpdate = true + } + + if d.HasChange("notification_topic_arn") { + v := d.Get("notification_topic_arn").(string) + req.NotificationTopicArn = aws.String(v) + if v == "" { + inactive := "inactive" + req.NotificationTopicStatus = &inactive + } + requestUpdate = true + } + + if requestUpdate { + log.Printf("[DEBUG] Modifying DAX Cluster (%s), opts:\n%s", d.Id(), req) + _, err := conn.UpdateCluster(req) + if err != nil { + return fmt.Errorf("[WARN] Error updating DAX cluster (%s), error: %s", d.Id(), err) + } + awaitUpdate = true + } + + if d.HasChange("replication_factor") { + oraw, nraw := d.GetChange("replication_factor") + o := oraw.(int) + n := nraw.(int) + if n < o { + log.Printf("[INFO] Decreasing nodes in DAX cluster %s from %d to %d", d.Id(), o, n) + _, err := conn.DecreaseReplicationFactor(&dax.DecreaseReplicationFactorInput{ + ClusterName: aws.String(d.Id()), + NewReplicationFactor: aws.Int64(int64(nraw.(int))), + }) + if err != nil { + return fmt.Errorf("[WARN] Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) + } + awaitUpdate = true + } + if n > o { + log.Printf("[INFO] Increasing nodes in DAX cluster %s from %d to %d", d.Id(), o, n) + _, err := conn.IncreaseReplicationFactor(&dax.IncreaseReplicationFactorInput{ + ClusterName: aws.String(d.Id()), + NewReplicationFactor: aws.Int64(int64(nraw.(int))), + }) + if err != nil { + return fmt.Errorf("[WARN] Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) + } + awaitUpdate = true + } + } + + if awaitUpdate { + log.Printf("[DEBUG] Waiting for update: %s", d.Id()) + pending := []string{"modifying"} + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: []string{"available"}, + Refresh: daxClusterStateRefreshFunc(conn, d.Id(), "available", pending), + Timeout: d.Timeout(schema.TimeoutUpdate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + _, sterr := stateConf.WaitForState() + if sterr != nil { + return fmt.Errorf("Error waiting for DAX (%s) to update: %s", d.Id(), sterr) + } + } + + return resourceAwsDaxClusterRead(d, meta) +} + +func setDaxClusterNodeData(d *schema.ResourceData, c *dax.Cluster) error { + sortedNodes := make([]*dax.Node, len(c.Nodes)) + copy(sortedNodes, c.Nodes) + sort.Sort(byNodeId(sortedNodes)) + + nodeDate := make([]map[string]interface{}, 0, len(sortedNodes)) + + for _, node := range sortedNodes { + if node.NodeId == nil || node.Endpoint == nil || node.Endpoint.Address == nil || node.Endpoint.Port == nil || node.AvailabilityZone == nil { + return fmt.Errorf("Unexpected nil pointer in: %s", node) + } + nodeDate = append(nodeDate, map[string]interface{}{ + "id": *node.NodeId, + "address": *node.Endpoint.Address, + "port": int(*node.Endpoint.Port), + "availability_zone": *node.AvailabilityZone, + }) + } + + return d.Set("nodes", nodeDate) +} + +type byNodeId []*dax.Node + +func (b byNodeId) Len() int { return len(b) } +func (b byNodeId) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b byNodeId) Less(i, j int) bool { + return b[i].NodeId != nil && b[j].NodeId != nil && + *b[i].NodeId < *b[j].NodeId +} + +func resourceAwsDaxClusterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + req := &dax.DeleteClusterInput{ + ClusterName: aws.String(d.Id()), + } + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteCluster(req) + if err != nil { + if isAWSErr(err, dax.ErrCodeInvalidClusterStateFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return err + } + + log.Printf("[DEBUG] Waiting for deletion: %v", d.Id()) + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating", "available", "deleting", "incompatible-parameters", "incompatible-network"}, + Target: []string{}, + Refresh: daxClusterStateRefreshFunc(conn, d.Id(), "", []string{}), + Timeout: d.Timeout(schema.TimeoutDelete), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + _, sterr := stateConf.WaitForState() + if sterr != nil { + return fmt.Errorf("Error waiting for DAX (%s) to delete: %s", d.Id(), sterr) + } + + d.SetId("") + + return nil +} + +func daxClusterStateRefreshFunc(conn *dax.DAX, clusterID, givenState string, pending []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeClusters(&dax.DescribeClustersInput{ + ClusterNames: []*string{aws.String(clusterID)}, + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeClusterNotFoundFault, "") { + log.Printf("[DEBUG] Detect deletion") + return nil, "", nil + } + + log.Printf("[ERROR] daxClusterStateRefreshFunc: %s", err) + return nil, "", err + } + + if len(resp.Clusters) == 0 { + return nil, "", fmt.Errorf("[WARN] Error: no DAX clusters found for id (%s)", clusterID) + } + + var c *dax.Cluster + for _, cluster := range resp.Clusters { + if *cluster.ClusterName == clusterID { + log.Printf("[DEBUG] Found matching DAX cluster: %s", *cluster.ClusterName) + c = cluster + } + } + + if c == nil { + return nil, "", fmt.Errorf("[WARN] Error: no matching DAX cluster for id (%s)", clusterID) + } + + // DescribeCluster returns a response without status late on in the + // deletion process - assume cluster is still deleting until we + // get ClusterNotFoundFault + if c.Status == nil { + log.Printf("[DEBUG] DAX Cluster %s has no status attribute set - assume status is deleting", clusterID) + return c, "deleting", nil + } + + log.Printf("[DEBUG] DAX Cluster (%s) status: %v", clusterID, *c.Status) + + // return the current state if it's in the pending array + for _, p := range pending { + log.Printf("[DEBUG] DAX: checking pending state (%s) for cluster (%s), cluster status: %s", pending, clusterID, *c.Status) + s := *c.Status + if p == s { + log.Printf("[DEBUG] Return with status: %v", *c.Status) + return c, p, nil + } + } + + // return given state if it's not in pending + if givenState != "" { + log.Printf("[DEBUG] DAX: checking given state (%s) of cluster (%s) against cluster status (%s)", givenState, clusterID, *c.Status) + // check to make sure we have the node count we're expecting + if int64(len(c.Nodes)) != *c.TotalNodes { + log.Printf("[DEBUG] Node count is not what is expected: %d found, %d expected", len(c.Nodes), *c.TotalNodes) + return nil, "creating", nil + } + + log.Printf("[DEBUG] Node count matched (%d)", len(c.Nodes)) + // loop the nodes and check their status as well + for _, n := range c.Nodes { + log.Printf("[DEBUG] Checking cache node for status: %s", n) + if n.NodeStatus != nil && *n.NodeStatus != "available" { + log.Printf("[DEBUG] Node (%s) is not yet available, status: %s", *n.NodeId, *n.NodeStatus) + return nil, "creating", nil + } + log.Printf("[DEBUG] Cache node not in expected state") + } + log.Printf("[DEBUG] DAX returning given state (%s), cluster: %s", givenState, c) + return c, givenState, nil + } + log.Printf("[DEBUG] current status: %v", *c.Status) + return c, *c.Status, nil + } +} + +func buildDaxArn(identifier, partition, accountid, region string) (string, error) { + if partition == "" { + return "", fmt.Errorf("Unable to construct DAX ARN because of missing AWS partition") + } + if accountid == "" { + return "", fmt.Errorf("Unable to construct DAX ARN because of missing AWS Account ID") + } + + arn := arn.ARN{ + Partition: partition, + Service: "dax", + Region: region, + AccountID: accountid, + Resource: fmt.Sprintf("cache/%s", identifier), + } + + return arn.String(), nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go index 9de42ed3b0b5..8d4b8eae0e4b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go @@ -8,17 +8,11 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/validation" ) -var directoryCreationFuncs = map[string]func(*directoryservice.DirectoryService, *schema.ResourceData) (string, error){ - "SimpleAD": createSimpleDirectoryService, - "MicrosoftAD": createActiveDirectoryService, - "ADConnector": createDirectoryConnector, -} - func resourceAwsDirectoryServiceDirectory() *schema.Resource { return &schema.Resource{ Create: resourceAwsDirectoryServiceDirectoryCreate, @@ -44,8 +38,12 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { "size": { Type: schema.TypeString, Optional: true, - Default: "Large", + Computed: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + directoryservice.DirectorySizeLarge, + directoryservice.DirectorySizeSmall, + }, false), }, "alias": { Type: schema.TypeString, @@ -67,6 +65,7 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { "tags": tagsSchema(), "vpc_settings": { Type: schema.TypeList, + MaxItems: 1, Optional: true, ForceNew: true, Elem: &schema.Resource{ @@ -88,6 +87,7 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { }, "connect_settings": { Type: schema.TypeList, + MaxItems: 1, Optional: true, ForceNew: true, Elem: &schema.Resource{ @@ -141,96 +141,91 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { "type": { Type: schema.TypeString, Optional: true, - Default: "SimpleAD", + Default: directoryservice.DirectoryTypeSimpleAd, ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - validTypes := []string{"SimpleAD", "MicrosoftAD"} - value := v.(string) - for validType, _ := range directoryCreationFuncs { - if validType == value { - return - } - } - es = append(es, fmt.Errorf("%q must be one of %q", k, validTypes)) - return - }, + ValidateFunc: validation.StringInSlice([]string{ + directoryservice.DirectoryTypeAdconnector, + directoryservice.DirectoryTypeMicrosoftAd, + directoryservice.DirectoryTypeSimpleAd, + }, false), + }, + "edition": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + directoryservice.DirectoryEditionEnterprise, + directoryservice.DirectoryEditionStandard, + }, false), }, }, } } func buildVpcSettings(d *schema.ResourceData) (vpcSettings *directoryservice.DirectoryVpcSettings, err error) { - if v, ok := d.GetOk("vpc_settings"); !ok { + v, ok := d.GetOk("vpc_settings") + if !ok { return nil, fmt.Errorf("vpc_settings is required for type = SimpleAD or MicrosoftAD") - } else { - settings := v.([]interface{}) - - if len(settings) > 1 { - return nil, fmt.Errorf("Only a single vpc_settings block is expected") - } else if len(settings) == 1 { - s := settings[0].(map[string]interface{}) - var subnetIds []*string - for _, id := range s["subnet_ids"].(*schema.Set).List() { - subnetIds = append(subnetIds, aws.String(id.(string))) - } + } + settings := v.([]interface{}) + s := settings[0].(map[string]interface{}) + var subnetIds []*string + for _, id := range s["subnet_ids"].(*schema.Set).List() { + subnetIds = append(subnetIds, aws.String(id.(string))) + } - vpcSettings = &directoryservice.DirectoryVpcSettings{ - SubnetIds: subnetIds, - VpcId: aws.String(s["vpc_id"].(string)), - } - } + vpcSettings = &directoryservice.DirectoryVpcSettings{ + SubnetIds: subnetIds, + VpcId: aws.String(s["vpc_id"].(string)), } return vpcSettings, nil } func buildConnectSettings(d *schema.ResourceData) (connectSettings *directoryservice.DirectoryConnectSettings, err error) { - if v, ok := d.GetOk("connect_settings"); !ok { + v, ok := d.GetOk("connect_settings") + if !ok { return nil, fmt.Errorf("connect_settings is required for type = ADConnector") - } else { - settings := v.([]interface{}) - - if len(settings) > 1 { - return nil, fmt.Errorf("Only a single connect_settings block is expected") - } else if len(settings) == 1 { - s := settings[0].(map[string]interface{}) + } + settings := v.([]interface{}) + s := settings[0].(map[string]interface{}) - var subnetIds []*string - for _, id := range s["subnet_ids"].(*schema.Set).List() { - subnetIds = append(subnetIds, aws.String(id.(string))) - } + var subnetIds []*string + for _, id := range s["subnet_ids"].(*schema.Set).List() { + subnetIds = append(subnetIds, aws.String(id.(string))) + } - var customerDnsIps []*string - for _, id := range s["customer_dns_ips"].(*schema.Set).List() { - customerDnsIps = append(customerDnsIps, aws.String(id.(string))) - } + var customerDnsIps []*string + for _, id := range s["customer_dns_ips"].(*schema.Set).List() { + customerDnsIps = append(customerDnsIps, aws.String(id.(string))) + } - connectSettings = &directoryservice.DirectoryConnectSettings{ - CustomerDnsIps: customerDnsIps, - CustomerUserName: aws.String(s["customer_username"].(string)), - SubnetIds: subnetIds, - VpcId: aws.String(s["vpc_id"].(string)), - } - } + connectSettings = &directoryservice.DirectoryConnectSettings{ + CustomerDnsIps: customerDnsIps, + CustomerUserName: aws.String(s["customer_username"].(string)), + SubnetIds: subnetIds, + VpcId: aws.String(s["vpc_id"].(string)), } return connectSettings, nil } func createDirectoryConnector(dsconn *directoryservice.DirectoryService, d *schema.ResourceData) (directoryId string, err error) { - if _, ok := d.GetOk("size"); !ok { - return "", fmt.Errorf("size is required for type = ADConnector") - } - input := directoryservice.ConnectDirectoryInput{ Name: aws.String(d.Get("name").(string)), Password: aws.String(d.Get("password").(string)), - Size: aws.String(d.Get("size").(string)), } if v, ok := d.GetOk("description"); ok { input.Description = aws.String(v.(string)) } + if v, ok := d.GetOk("size"); ok { + input.Size = aws.String(v.(string)) + } else { + // Matching previous behavior of Default: "Large" for Size attribute + input.Size = aws.String(directoryservice.DirectorySizeLarge) + } if v, ok := d.GetOk("short_name"); ok { input.ShortName = aws.String(v.(string)) } @@ -251,19 +246,20 @@ func createDirectoryConnector(dsconn *directoryservice.DirectoryService, d *sche } func createSimpleDirectoryService(dsconn *directoryservice.DirectoryService, d *schema.ResourceData) (directoryId string, err error) { - if _, ok := d.GetOk("size"); !ok { - return "", fmt.Errorf("size is required for type = SimpleAD") - } - input := directoryservice.CreateDirectoryInput{ Name: aws.String(d.Get("name").(string)), Password: aws.String(d.Get("password").(string)), - Size: aws.String(d.Get("size").(string)), } if v, ok := d.GetOk("description"); ok { input.Description = aws.String(v.(string)) } + if v, ok := d.GetOk("size"); ok { + input.Size = aws.String(v.(string)) + } else { + // Matching previous behavior of Default: "Large" for Size attribute + input.Size = aws.String(directoryservice.DirectorySizeLarge) + } if v, ok := d.GetOk("short_name"); ok { input.ShortName = aws.String(v.(string)) } @@ -295,6 +291,9 @@ func createActiveDirectoryService(dsconn *directoryservice.DirectoryService, d * if v, ok := d.GetOk("short_name"); ok { input.ShortName = aws.String(v.(string)) } + if v, ok := d.GetOk("edition"); ok { + input.Edition = aws.String(v.(string)) + } input.VpcSettings, err = buildVpcSettings(d) if err != nil { @@ -314,13 +313,18 @@ func createActiveDirectoryService(dsconn *directoryservice.DirectoryService, d * func resourceAwsDirectoryServiceDirectoryCreate(d *schema.ResourceData, meta interface{}) error { dsconn := meta.(*AWSClient).dsconn - creationFunc, ok := directoryCreationFuncs[d.Get("type").(string)] - if !ok { - // Shouldn't happen as this is validated above - return fmt.Errorf("Unsupported directory type: %s", d.Get("type")) + var directoryId string + var err error + directoryType := d.Get("type").(string) + + if directoryType == directoryservice.DirectoryTypeAdconnector { + directoryId, err = createDirectoryConnector(dsconn, d) + } else if directoryType == directoryservice.DirectoryTypeMicrosoftAd { + directoryId, err = createActiveDirectoryService(dsconn, d) + } else if directoryType == directoryservice.DirectoryTypeSimpleAd { + directoryId, err = createSimpleDirectoryService(dsconn, d) } - directoryId, err := creationFunc(dsconn, d) if err != nil { return err } @@ -330,8 +334,12 @@ func resourceAwsDirectoryServiceDirectoryCreate(d *schema.ResourceData, meta int // Wait for creation log.Printf("[DEBUG] Waiting for DS (%q) to become available", d.Id()) stateConf := &resource.StateChangeConf{ - Pending: []string{"Requested", "Creating", "Created"}, - Target: []string{"Active"}, + Pending: []string{ + directoryservice.DirectoryStageRequested, + directoryservice.DirectoryStageCreating, + directoryservice.DirectoryStageCreated, + }, + Target: []string{directoryservice.DirectoryStageActive}, Refresh: func() (interface{}, string, error) { resp, err := dsconn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ DirectoryIds: []*string{aws.String(d.Id())}, @@ -427,28 +435,23 @@ func resourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta inter dir := out.DirectoryDescriptions[0] log.Printf("[DEBUG] Received DS directory: %s", dir) - d.Set("access_url", *dir.AccessUrl) - d.Set("alias", *dir.Alias) - if dir.Description != nil { - d.Set("description", *dir.Description) - } + d.Set("access_url", dir.AccessUrl) + d.Set("alias", dir.Alias) + d.Set("description", dir.Description) - if *dir.Type == "ADConnector" { + if *dir.Type == directoryservice.DirectoryTypeAdconnector { d.Set("dns_ip_addresses", schema.NewSet(schema.HashString, flattenStringList(dir.ConnectSettings.ConnectIps))) } else { d.Set("dns_ip_addresses", schema.NewSet(schema.HashString, flattenStringList(dir.DnsIpAddrs))) } - d.Set("name", *dir.Name) - if dir.ShortName != nil { - d.Set("short_name", *dir.ShortName) - } - if dir.Size != nil { - d.Set("size", *dir.Size) - } - d.Set("type", *dir.Type) + d.Set("name", dir.Name) + d.Set("short_name", dir.ShortName) + d.Set("size", dir.Size) + d.Set("edition", dir.Edition) + d.Set("type", dir.Type) d.Set("vpc_settings", flattenDSVpcSettings(dir.VpcSettings)) d.Set("connect_settings", flattenDSConnectSettings(dir.DnsIpAddrs, dir.ConnectSettings)) - d.Set("enable_sso", *dir.SsoEnabled) + d.Set("enable_sso", dir.SsoEnabled) if dir.VpcSettings != nil { d.Set("security_group_id", *dir.VpcSettings.SecurityGroupId) @@ -481,21 +484,24 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int // Wait for deletion log.Printf("[DEBUG] Waiting for DS (%q) to be deleted", d.Id()) stateConf := &resource.StateChangeConf{ - Pending: []string{"Deleting"}, - Target: []string{"Deleted"}, + Pending: []string{ + directoryservice.DirectoryStageActive, + directoryservice.DirectoryStageDeleting, + }, + Target: []string{directoryservice.DirectoryStageDeleted}, Refresh: func() (interface{}, string, error) { resp, err := dsconn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ DirectoryIds: []*string{aws.String(d.Id())}, }) if err != nil { - if dserr, ok := err.(awserr.Error); ok && dserr.Code() == "EntityDoesNotExistException" { - return 42, "Deleted", nil + if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { + return 42, directoryservice.DirectoryStageDeleted, nil } return nil, "error", err } if len(resp.DirectoryDescriptions) == 0 { - return 42, "Deleted", nil + return 42, directoryservice.DirectoryStageDeleted, nil } ds := resp.DirectoryDescriptions[0] diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go index 6074c395baba..0dc1066256b7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go @@ -2,9 +2,11 @@ package aws import ( "fmt" + "log" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -14,25 +16,34 @@ func resourceAwsDxConnection() *schema.Resource { return &schema.Resource{ Create: resourceAwsDxConnectionCreate, Read: resourceAwsDxConnectionRead, + Update: resourceAwsDxConnectionUpdate, Delete: resourceAwsDxConnectionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "bandwidth": &schema.Schema{ + "bandwidth": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateDxConnectionBandWidth, }, - "location": &schema.Schema{ + "location": { Type: schema.TypeString, Required: true, ForceNew: true, }, + "tags": tagsSchema(), }, } } @@ -40,53 +51,105 @@ func resourceAwsDxConnection() *schema.Resource { func resourceAwsDxConnectionCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - input := &directconnect.CreateConnectionInput{ + req := &directconnect.CreateConnectionInput{ Bandwidth: aws.String(d.Get("bandwidth").(string)), ConnectionName: aws.String(d.Get("name").(string)), Location: aws.String(d.Get("location").(string)), } - resp, err := conn.CreateConnection(input) + + log.Printf("[DEBUG] Creating Direct Connect connection: %#v", req) + resp, err := conn.CreateConnection(req) if err != nil { return err } - d.SetId(*resp.ConnectionId) - return resourceAwsDxConnectionRead(d, meta) + + d.SetId(aws.StringValue(resp.ConnectionId)) + return resourceAwsDxConnectionUpdate(d, meta) } func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - connectionId := d.Id() - input := &directconnect.DescribeConnectionsInput{ - ConnectionId: aws.String(connectionId), - } - resp, err := conn.DescribeConnections(input) + resp, err := conn.DescribeConnections(&directconnect.DescribeConnectionsInput{ + ConnectionId: aws.String(d.Id()), + }) if err != nil { + if isNoSuchDxConnectionErr(err) { + log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } return err } + if len(resp.Connections) < 1 { + log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) d.SetId("") return nil } if len(resp.Connections) != 1 { - return fmt.Errorf("[ERROR] Number of DX Connection (%s) isn't one, got %d", connectionId, len(resp.Connections)) + return fmt.Errorf("[ERROR] Number of Direct Connect connections (%s) isn't one, got %d", d.Id(), len(resp.Connections)) + } + connection := resp.Connections[0] + if d.Id() != aws.StringValue(connection.ConnectionId) { + return fmt.Errorf("[ERROR] Direct Connect connection (%s) not found", d.Id()) + } + if aws.StringValue(connection.ConnectionState) == directconnect.ConnectionStateDeleted { + log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } - if d.Id() != *resp.Connections[0].ConnectionId { - return fmt.Errorf("[ERROR] DX Connection (%s) not found", connectionId) + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxcon/%s", d.Id()), + }.String() + d.Set("arn", arn) + d.Set("name", connection.ConnectionName) + d.Set("bandwidth", connection.Bandwidth) + d.Set("location", connection.Location) + + if err := getTagsDX(conn, d, arn); err != nil { + return err } + return nil } +func resourceAwsDxConnectionUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxcon/%s", d.Id()), + }.String() + if err := setTagsDX(conn, d, arn); err != nil { + return err + } + + return resourceAwsDxConnectionRead(d, meta) +} + func resourceAwsDxConnectionDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - input := &directconnect.DeleteConnectionInput{ + log.Printf("[DEBUG] Deleting Direct Connect connection: %s", d.Id()) + _, err := conn.DeleteConnection(&directconnect.DeleteConnectionInput{ ConnectionId: aws.String(d.Id()), - } - _, err := conn.DeleteConnection(input) + }) if err != nil { + if isNoSuchDxConnectionErr(err) { + return nil + } return err } + deleteStateConf := &resource.StateChangeConf{ Pending: []string{directconnect.ConnectionStatePending, directconnect.ConnectionStateOrdering, directconnect.ConnectionStateAvailable, directconnect.ConnectionStateRequested, directconnect.ConnectionStateDeleting}, Target: []string{directconnect.ConnectionStateDeleted}, @@ -97,9 +160,9 @@ func resourceAwsDxConnectionDelete(d *schema.ResourceData, meta interface{}) err } _, err = deleteStateConf.WaitForState() if err != nil { - return fmt.Errorf("Error waiting for Dx Connection (%s) to be deleted: %s", d.Id(), err) + return fmt.Errorf("Error waiting for Direct Connect connection (%s) to be deleted: %s", d.Id(), err) } - d.SetId("") + return nil } @@ -112,6 +175,13 @@ func dxConnectionRefreshStateFunc(conn *directconnect.DirectConnect, connId stri if err != nil { return nil, "failed", err } + if len(resp.Connections) < 1 { + return resp, directconnect.ConnectionStateDeleted, nil + } return resp, *resp.Connections[0].ConnectionState, nil } } + +func isNoSuchDxConnectionErr(err error) bool { + return isAWSErr(err, "DirectConnectClientException", "Could not find Connection with ID") +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go index 89dd99111f41..88fcef06dc21 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go @@ -2,9 +2,11 @@ package aws import ( "fmt" + "log" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -16,33 +18,44 @@ func resourceAwsDxLag() *schema.Resource { Read: resourceAwsDxLagRead, Update: resourceAwsDxLagUpdate, Delete: resourceAwsDxLagDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { Type: schema.TypeString, Required: true, }, - "connections_bandwidth": &schema.Schema{ + "connections_bandwidth": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: validateDxConnectionBandWidth, }, - "location": &schema.Schema{ + "location": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "number_of_connections": &schema.Schema{ + "number_of_connections": { Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, ForceNew: true, + Deprecated: "Use aws_dx_connection and aws_dx_connection_association resources instead. " + + "Default connections will be removed as part of LAG creation automatically in future versions.", }, - "force_destroy": &schema.Schema{ + "force_destroy": { Type: schema.TypeBool, Optional: true, Default: false, }, + "tags": tagsSchema(), }, } } @@ -50,89 +63,164 @@ func resourceAwsDxLag() *schema.Resource { func resourceAwsDxLagCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - input := &directconnect.CreateLagInput{ + var noOfConnections int + if v, ok := d.GetOk("number_of_connections"); ok { + noOfConnections = v.(int) + } else { + noOfConnections = 1 + } + + req := &directconnect.CreateLagInput{ ConnectionsBandwidth: aws.String(d.Get("connections_bandwidth").(string)), LagName: aws.String(d.Get("name").(string)), Location: aws.String(d.Get("location").(string)), - NumberOfConnections: aws.Int64(int64(d.Get("number_of_connections").(int))), + NumberOfConnections: aws.Int64(int64(noOfConnections)), } - resp, err := conn.CreateLag(input) + + log.Printf("[DEBUG] Creating Direct Connect LAG: %#v", req) + resp, err := conn.CreateLag(req) if err != nil { return err } - d.SetId(*resp.LagId) - return resourceAwsDxLagRead(d, meta) + + // TODO: Remove default connection(s) automatically provisioned by AWS + // per NumberOfConnections + + d.SetId(aws.StringValue(resp.LagId)) + return resourceAwsDxLagUpdate(d, meta) } func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - lagId := d.Id() - input := &directconnect.DescribeLagsInput{ - LagId: aws.String(lagId), - } - resp, err := conn.DescribeLags(input) + resp, err := conn.DescribeLags(&directconnect.DescribeLagsInput{ + LagId: aws.String(d.Id()), + }) if err != nil { + if isNoSuchDxLagErr(err) { + log.Printf("[WARN] Direct Connect LAG (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } return err } + if len(resp.Lags) < 1 { + log.Printf("[WARN] Direct Connect LAG (%s) not found, removing from state", d.Id()) d.SetId("") return nil } if len(resp.Lags) != 1 { - return fmt.Errorf("[ERROR] Number of DX Lag (%s) isn't one, got %d", lagId, len(resp.Lags)) + return fmt.Errorf("[ERROR] Number of Direct Connect LAGs (%s) isn't one, got %d", d.Id(), len(resp.Lags)) } - if d.Id() != *resp.Lags[0].LagId { - return fmt.Errorf("[ERROR] DX Lag (%s) not found", lagId) + lag := resp.Lags[0] + if d.Id() != aws.StringValue(lag.LagId) { + return fmt.Errorf("[ERROR] Direct Connect LAG (%s) not found", d.Id()) } + + if aws.StringValue(lag.LagState) == directconnect.LagStateDeleted { + log.Printf("[WARN] Direct Connect LAG (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxlag/%s", d.Id()), + }.String() + d.Set("arn", arn) + d.Set("name", lag.LagName) + d.Set("connections_bandwidth", lag.ConnectionsBandwidth) + d.Set("location", lag.Location) + + if err := getTagsDX(conn, d, arn); err != nil { + return err + } + return nil } func resourceAwsDxLagUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - input := &directconnect.UpdateLagInput{ - LagId: aws.String(d.Id()), - } + d.Partial(true) + if d.HasChange("name") { - input.LagName = aws.String(d.Get("name").(string)) + req := &directconnect.UpdateLagInput{ + LagId: aws.String(d.Id()), + LagName: aws.String(d.Get("name").(string)), + } + + log.Printf("[DEBUG] Updating Direct Connect LAG: %#v", req) + _, err := conn.UpdateLag(req) + if err != nil { + return err + } else { + d.SetPartial("name") + } } - _, err := conn.UpdateLag(input) - if err != nil { + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxlag/%s", d.Id()), + }.String() + if err := setTagsDX(conn, d, arn); err != nil { return err + } else { + d.SetPartial("tags") } - return nil + + d.Partial(false) + + return resourceAwsDxLagRead(d, meta) } func resourceAwsDxLagDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn if d.Get("force_destroy").(bool) { - input := &directconnect.DescribeLagsInput{ + resp, err := conn.DescribeLags(&directconnect.DescribeLagsInput{ LagId: aws.String(d.Id()), - } - resp, err := conn.DescribeLags(input) + }) if err != nil { + if isNoSuchDxLagErr(err) { + return nil + } return err } + + if len(resp.Lags) < 1 { + return nil + } lag := resp.Lags[0] for _, v := range lag.Connections { - dcinput := &directconnect.DeleteConnectionInput{ + log.Printf("[DEBUG] Deleting Direct Connect connection: %s", aws.StringValue(v.ConnectionId)) + _, err := conn.DeleteConnection(&directconnect.DeleteConnectionInput{ ConnectionId: v.ConnectionId, - } - if _, err := conn.DeleteConnection(dcinput); err != nil { + }) + if err != nil && !isNoSuchDxConnectionErr(err) { return err } } } - input := &directconnect.DeleteLagInput{ + log.Printf("[DEBUG] Deleting Direct Connect LAG: %s", d.Id()) + _, err := conn.DeleteLag(&directconnect.DeleteLagInput{ LagId: aws.String(d.Id()), - } - _, err := conn.DeleteLag(input) + }) if err != nil { + if isNoSuchDxLagErr(err) { + return nil + } return err } + deleteStateConf := &resource.StateChangeConf{ Pending: []string{directconnect.LagStateAvailable, directconnect.LagStateRequested, directconnect.LagStatePending, directconnect.LagStateDeleting}, Target: []string{directconnect.LagStateDeleted}, @@ -143,9 +231,9 @@ func resourceAwsDxLagDelete(d *schema.ResourceData, meta interface{}) error { } _, err = deleteStateConf.WaitForState() if err != nil { - return fmt.Errorf("Error waiting for Dx Lag (%s) to be deleted: %s", d.Id(), err) + return fmt.Errorf("Error waiting for Direct Connect LAG (%s) to be deleted: %s", d.Id(), err) } - d.SetId("") + return nil } @@ -158,6 +246,13 @@ func dxLagRefreshStateFunc(conn *directconnect.DirectConnect, lagId string) reso if err != nil { return nil, "failed", err } + if len(resp.Lags) < 1 { + return resp, directconnect.LagStateDeleted, nil + } return resp, *resp.Lags[0].LagState, nil } } + +func isNoSuchDxLagErr(err error) bool { + return isAWSErr(err, "DirectConnectClientException", "Could not find Lag with ID") +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go index 50cf27a08c19..1aa608abd6a0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go @@ -440,9 +440,7 @@ func resourceAwsDynamoDbTableDelete(d *schema.ResourceData, meta interface{}) er log.Printf("[DEBUG] DynamoDB delete table: %s", d.Id()) - _, err := conn.DeleteTable(&dynamodb.DeleteTableInput{ - TableName: aws.String(d.Id()), - }) + err := deleteAwsDynamoDbTable(d.Id(), conn) if err != nil { if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "Requested resource not found: Table: ") { return nil @@ -477,6 +475,35 @@ func resourceAwsDynamoDbTableDelete(d *schema.ResourceData, meta interface{}) er return err } +func deleteAwsDynamoDbTable(tableName string, conn *dynamodb.DynamoDB) error { + input := &dynamodb.DeleteTableInput{ + TableName: aws.String(tableName), + } + + return resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteTable(input) + if err != nil { + // Subscriber limit exceeded: Only 10 tables can be created, updated, or deleted simultaneously + if isAWSErr(err, dynamodb.ErrCodeLimitExceededException, "simultaneously") { + return resource.RetryableError(err) + } + // This handles multiple scenarios in the DynamoDB API: + // 1. Updating a table immediately before deletion may return: + // ResourceInUseException: Attempt to change a resource which is still in use: Table is being updated: + // 2. Removing a table from a DynamoDB global table may return: + // ResourceInUseException: Attempt to change a resource which is still in use: Table is being deleted: + if isAWSErr(err, dynamodb.ErrCodeResourceInUseException, "") { + return resource.RetryableError(err) + } + if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "Requested resource not found: Table: ") { + return resource.NonRetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) +} + func updateDynamoDbTimeToLive(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { toBeEnabled := false attributeName := "" diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go index 44f7ee092f0f..fa72419e4a50 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go @@ -356,6 +356,16 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { } return resource.NonRetryableError(err) } + + if d.IsNewResource() && len(out.Services) < 1 { + return resource.RetryableError(fmt.Errorf("No ECS service found: %q", d.Id())) + } + + service := out.Services[0] + if d.IsNewResource() && *service.Status == "INACTIVE" { + return resource.RetryableError(fmt.Errorf("ECS service currently INACTIVE: %q", d.Id())) + } + return nil }) if err != nil { @@ -363,7 +373,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { } if len(out.Services) < 1 { - log.Printf("[DEBUG] Removing ECS service %s (%s) because it's gone", d.Get("name").(string), d.Id()) + log.Printf("[WARN] Removing ECS service %s (%s) because it's gone", d.Get("name").(string), d.Id()) d.SetId("") return nil } @@ -372,7 +382,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { // Status==INACTIVE means deleted service if *service.Status == "INACTIVE" { - log.Printf("[DEBUG] Removing ECS service %q because it's INACTIVE", *service.ServiceArn) + log.Printf("[WARN] Removing ECS service %q because it's INACTIVE", *service.ServiceArn) d.SetId("") return nil } @@ -418,7 +428,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { } if service.LoadBalancers != nil { - d.Set("load_balancers", flattenEcsLoadBalancers(service.LoadBalancers)) + d.Set("load_balancer", flattenEcsLoadBalancers(service.LoadBalancers)) } if err := d.Set("placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)); err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go index b67b1b593957..7b04cea2c096 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go @@ -405,6 +405,9 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface if isAWSErr(err, "ValidationException", "enable a service-linked role to give Amazon ES permissions") { return resource.RetryableError(err) } + if isAWSErr(err, "ValidationException", "Domain is still being deleted") { + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go index 66086e592457..f5048e71ef70 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go @@ -15,6 +15,8 @@ import ( "github.com/aws/aws-sdk-go/service/emr" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsEMRCluster() *schema.Resource { @@ -173,6 +175,16 @@ func resourceAwsEMRCluster() *schema.Resource { Optional: true, Default: 0, }, + "autoscaling_policy": { + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: suppressEquivalentJsonDiffs, + ValidateFunc: validateJsonString, + StateFunc: func(v interface{}) string { + jsonString, _ := structure.NormalizeJsonString(v) + return jsonString + }, + }, "instance_role": { Type: schema.TypeString, Required: true, @@ -225,6 +237,16 @@ func resourceAwsEMRCluster() *schema.Resource { ForceNew: true, Required: true, }, + "scale_down_behavior": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + emr.ScaleDownBehaviorTerminateAtInstanceHour, + emr.ScaleDownBehaviorTerminateAtTaskCompletion, + }, false), + }, "security_configuration": { Type: schema.TypeString, ForceNew: true, @@ -352,10 +374,15 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error if v, ok := d.GetOk("log_uri"); ok { params.LogUri = aws.String(v.(string)) } + if v, ok := d.GetOk("autoscaling_role"); ok { params.AutoScalingRole = aws.String(v.(string)) } + if v, ok := d.GetOk("scale_down_behavior"); ok { + params.ScaleDownBehavior = aws.String(v.(string)) + } + if v, ok := d.GetOk("security_configuration"); ok { params.SecurityConfiguration = aws.String(v.(string)) } @@ -475,6 +502,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { } d.Set("name", cluster.Name) + d.Set("service_role", cluster.ServiceRole) d.Set("security_configuration", cluster.SecurityConfiguration) d.Set("autoscaling_role", cluster.AutoScalingRole) @@ -484,6 +512,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("visible_to_all_users", cluster.VisibleToAllUsers) d.Set("tags", tagsToMapEMR(cluster.Tags)) d.Set("ebs_root_volume_size", cluster.EbsRootVolumeSize) + d.Set("scale_down_behavior", cluster.ScaleDownBehavior) if cluster.CustomAmiId != nil { d.Set("custom_ami_id", cluster.CustomAmiId) @@ -750,6 +779,13 @@ func flattenInstanceGroups(igs []*emr.InstanceGroup) []map[string]interface{} { attrs["instance_count"] = *ig.RequestedInstanceCount attrs["instance_role"] = *ig.InstanceGroupType attrs["instance_type"] = *ig.InstanceType + + if ig.AutoScalingPolicy != nil { + attrs["autoscaling_policy"] = *ig.AutoScalingPolicy + } else { + attrs["autoscaling_policy"] = "" + } + attrs["name"] = *ig.Name result = append(result, attrs) } @@ -897,7 +933,7 @@ func expandBootstrapActions(bootstrapActions []interface{}) []*emr.BootstrapActi } func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) []*emr.InstanceGroupConfig { - configsOut := []*emr.InstanceGroupConfig{} + instanceGroupConfig := []*emr.InstanceGroupConfig{} for _, raw := range instanceGroupConfigs { configAttributes := raw.(map[string]interface{}) @@ -912,42 +948,68 @@ func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) []*emr.Insta InstanceCount: aws.Int64(int64(configInstanceCount)), } - if bidPrice, ok := configAttributes["bid_price"]; ok { - if bidPrice != "" { - config.BidPrice = aws.String(bidPrice.(string)) - config.Market = aws.String("SPOT") - } else { - config.Market = aws.String("ON_DEMAND") - } + applyBidPrice(config, configAttributes) + applyEbsConfig(configAttributes, config) + applyAutoScalingPolicy(configAttributes, config) + + instanceGroupConfig = append(instanceGroupConfig, config) + } + + return instanceGroupConfig +} + +func applyBidPrice(config *emr.InstanceGroupConfig, configAttributes map[string]interface{}) { + if bidPrice, ok := configAttributes["bid_price"]; ok { + if bidPrice != "" { + config.BidPrice = aws.String(bidPrice.(string)) + config.Market = aws.String("SPOT") + } else { + config.Market = aws.String("ON_DEMAND") } + } +} - if rawEbsConfigs, ok := configAttributes["ebs_config"]; ok { - ebsConfig := &emr.EbsConfiguration{} - - ebsBlockDeviceConfigs := make([]*emr.EbsBlockDeviceConfig, 0) - for _, rawEbsConfig := range rawEbsConfigs.(*schema.Set).List() { - rawEbsConfig := rawEbsConfig.(map[string]interface{}) - ebsBlockDeviceConfig := &emr.EbsBlockDeviceConfig{ - VolumesPerInstance: aws.Int64(int64(rawEbsConfig["volumes_per_instance"].(int))), - VolumeSpecification: &emr.VolumeSpecification{ - SizeInGB: aws.Int64(int64(rawEbsConfig["size"].(int))), - VolumeType: aws.String(rawEbsConfig["type"].(string)), - }, - } - if v, ok := rawEbsConfig["iops"].(int); ok && v != 0 { - ebsBlockDeviceConfig.VolumeSpecification.Iops = aws.Int64(int64(v)) - } - ebsBlockDeviceConfigs = append(ebsBlockDeviceConfigs, ebsBlockDeviceConfig) +func applyEbsConfig(configAttributes map[string]interface{}, config *emr.InstanceGroupConfig) { + if rawEbsConfigs, ok := configAttributes["ebs_config"]; ok { + ebsConfig := &emr.EbsConfiguration{} + + ebsBlockDeviceConfigs := make([]*emr.EbsBlockDeviceConfig, 0) + for _, rawEbsConfig := range rawEbsConfigs.(*schema.Set).List() { + rawEbsConfig := rawEbsConfig.(map[string]interface{}) + ebsBlockDeviceConfig := &emr.EbsBlockDeviceConfig{ + VolumesPerInstance: aws.Int64(int64(rawEbsConfig["volumes_per_instance"].(int))), + VolumeSpecification: &emr.VolumeSpecification{ + SizeInGB: aws.Int64(int64(rawEbsConfig["size"].(int))), + VolumeType: aws.String(rawEbsConfig["type"].(string)), + }, } - ebsConfig.EbsBlockDeviceConfigs = ebsBlockDeviceConfigs - - config.EbsConfiguration = ebsConfig + if v, ok := rawEbsConfig["iops"].(int); ok && v != 0 { + ebsBlockDeviceConfig.VolumeSpecification.Iops = aws.Int64(int64(v)) + } + ebsBlockDeviceConfigs = append(ebsBlockDeviceConfigs, ebsBlockDeviceConfig) } + ebsConfig.EbsBlockDeviceConfigs = ebsBlockDeviceConfigs - configsOut = append(configsOut, config) + config.EbsConfiguration = ebsConfig } +} - return configsOut +func applyAutoScalingPolicy(configAttributes map[string]interface{}, config *emr.InstanceGroupConfig) { + if rawAutoScalingPolicy, ok := configAttributes["autoscaling_policy"]; ok { + autoScalingConfig, _ := expandAutoScalingPolicy(rawAutoScalingPolicy.(string)) + config.AutoScalingPolicy = autoScalingConfig + } +} + +func expandAutoScalingPolicy(rawDefinitions string) (*emr.AutoScalingPolicy, error) { + var policy *emr.AutoScalingPolicy + + err := json.Unmarshal([]byte(rawDefinitions), &policy) + if err != nil { + return nil, fmt.Errorf("Error decoding JSON: %s", err) + } + + return policy, nil } func expandConfigures(input string) []*emr.Configuration { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go new file mode 100644 index 000000000000..f2ef67f2080f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go @@ -0,0 +1,181 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/gamelift" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGameliftAlias() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGameliftAliasCreate, + Read: resourceAwsGameliftAliasRead, + Update: resourceAwsGameliftAliasUpdate, + Delete: resourceAwsGameliftAliasDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 1024), + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 1024), + }, + "routing_strategy": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "fleet_id": { + Type: schema.TypeString, + Optional: true, + }, + "message": { + Type: schema.TypeString, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + gamelift.RoutingStrategyTypeSimple, + gamelift.RoutingStrategyTypeTerminal, + }, false), + }, + }, + }, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsGameliftAliasCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + rs := expandGameliftRoutingStrategy(d.Get("routing_strategy").([]interface{})) + input := gamelift.CreateAliasInput{ + Name: aws.String(d.Get("name").(string)), + RoutingStrategy: rs, + } + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + log.Printf("[INFO] Creating Gamelift Alias: %s", input) + out, err := conn.CreateAlias(&input) + if err != nil { + return err + } + + d.SetId(*out.Alias.AliasId) + + return resourceAwsGameliftAliasRead(d, meta) +} + +func resourceAwsGameliftAliasRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + log.Printf("[INFO] Describing Gamelift Alias: %s", d.Id()) + out, err := conn.DescribeAlias(&gamelift.DescribeAliasInput{ + AliasId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") { + d.SetId("") + log.Printf("[WARN] Gamelift Alias (%s) not found, removing from state", d.Id()) + return nil + } + return err + } + a := out.Alias + + d.Set("arn", a.AliasArn) + d.Set("description", a.Description) + d.Set("name", a.Name) + d.Set("routing_strategy", flattenGameliftRoutingStrategy(a.RoutingStrategy)) + + return nil +} + +func resourceAwsGameliftAliasUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + log.Printf("[INFO] Updating Gamelift Alias: %s", d.Id()) + _, err := conn.UpdateAlias(&gamelift.UpdateAliasInput{ + AliasId: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Description: aws.String(d.Get("description").(string)), + RoutingStrategy: expandGameliftRoutingStrategy(d.Get("routing_strategy").([]interface{})), + }) + if err != nil { + return err + } + + return resourceAwsGameliftAliasRead(d, meta) +} + +func resourceAwsGameliftAliasDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + log.Printf("[INFO] Deleting Gamelift Alias: %s", d.Id()) + _, err := conn.DeleteAlias(&gamelift.DeleteAliasInput{ + AliasId: aws.String(d.Id()), + }) + if err != nil { + return err + } + + return nil +} + +func expandGameliftRoutingStrategy(cfg []interface{}) *gamelift.RoutingStrategy { + if len(cfg) < 1 { + return nil + } + + strategy := cfg[0].(map[string]interface{}) + + out := gamelift.RoutingStrategy{ + Type: aws.String(strategy["type"].(string)), + } + + if v, ok := strategy["fleet_id"].(string); ok && len(v) > 0 { + out.FleetId = aws.String(v) + } + if v, ok := strategy["message"].(string); ok && len(v) > 0 { + out.Message = aws.String(v) + } + + return &out +} + +func flattenGameliftRoutingStrategy(rs *gamelift.RoutingStrategy) []interface{} { + if rs == nil { + return []interface{}{} + } + + m := make(map[string]interface{}, 0) + if rs.FleetId != nil { + m["fleet_id"] = *rs.FleetId + } + if rs.Message != nil { + m["message"] = *rs.Message + } + m["type"] = *rs.Type + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go new file mode 100644 index 000000000000..be1a328daab2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go @@ -0,0 +1,604 @@ +package aws + +import ( + "fmt" + "log" + "reflect" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/gamelift" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGameliftFleet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGameliftFleetCreate, + Read: resourceAwsGameliftFleetRead, + Update: resourceAwsGameliftFleetUpdate, + Delete: resourceAwsGameliftFleetDelete, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(70 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "build_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ec2_instance_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 1024), + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 1024), + }, + "ec2_inbound_permission": { + Type: schema.TypeList, + Optional: true, + MaxItems: 50, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "from_port": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 60000), + }, + "ip_range": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCIDRNetworkAddress, + }, + "protocol": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + gamelift.IpProtocolTcp, + gamelift.IpProtocolUdp, + }, false), + }, + "to_port": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 60000), + }, + }, + }, + }, + "log_paths": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "metric_groups": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + }, + "new_game_session_protection_policy": { + Type: schema.TypeString, + Optional: true, + Default: gamelift.ProtectionPolicyNoProtection, + ValidateFunc: validation.StringInSlice([]string{ + gamelift.ProtectionPolicyNoProtection, + gamelift.ProtectionPolicyFullProtection, + }, false), + }, + "operating_system": { + Type: schema.TypeString, + Computed: true, + }, + "resource_creation_limit_policy": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "new_game_sessions_per_creator": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(0), + }, + "policy_period_in_minutes": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(0), + }, + }, + }, + }, + "runtime_configuration": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "game_session_activation_timeout_seconds": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(1, 600), + }, + "max_concurrent_game_session_activations": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(1, 2147483647), + }, + "server_process": { + Type: schema.TypeList, + Optional: true, + MaxItems: 50, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "concurrent_executions": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(1), + }, + "launch_path": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 1024), + }, + "parameters": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 1024), + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func resourceAwsGameliftFleetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + input := gamelift.CreateFleetInput{ + BuildId: aws.String(d.Get("build_id").(string)), + EC2InstanceType: aws.String(d.Get("ec2_instance_type").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + if v, ok := d.GetOk("ec2_inbound_permission"); ok { + input.EC2InboundPermissions = expandGameliftIpPermissions(v.([]interface{})) + } + if v, ok := d.GetOk("metric_groups"); ok { + input.MetricGroups = expandStringList(v.([]interface{})) + } + if v, ok := d.GetOk("new_game_session_protection_policy"); ok { + input.NewGameSessionProtectionPolicy = aws.String(v.(string)) + } + if v, ok := d.GetOk("resource_creation_limit_policy"); ok { + input.ResourceCreationLimitPolicy = expandGameliftResourceCreationLimitPolicy(v.([]interface{})) + } + if v, ok := d.GetOk("runtime_configuration"); ok { + input.RuntimeConfiguration = expandGameliftRuntimeConfiguration(v.([]interface{})) + } + + log.Printf("[INFO] Creating Gamelift Fleet: %s", input) + out, err := conn.CreateFleet(&input) + if err != nil { + return err + } + + d.SetId(*out.FleetAttributes.FleetId) + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + gamelift.FleetStatusActivating, + gamelift.FleetStatusBuilding, + gamelift.FleetStatusDownloading, + gamelift.FleetStatusNew, + gamelift.FleetStatusValidating, + }, + Target: []string{gamelift.FleetStatusActive}, + Timeout: d.Timeout(schema.TimeoutCreate), + Refresh: func() (interface{}, string, error) { + out, err := conn.DescribeFleetAttributes(&gamelift.DescribeFleetAttributesInput{ + FleetIds: aws.StringSlice([]string{d.Id()}), + }) + if err != nil { + return 42, "", err + } + + attributes := out.FleetAttributes + if len(attributes) < 1 { + return nil, "", nil + } + if len(attributes) != 1 { + return 42, "", fmt.Errorf("Expected exactly 1 Gamelift fleet, found %d under %q", + len(attributes), d.Id()) + } + + fleet := attributes[0] + return fleet, *fleet.Status, nil + }, + } + _, err = stateConf.WaitForState() + if err != nil { + events, fErr := getGameliftFleetFailures(conn, d.Id()) + if fErr != nil { + log.Printf("[WARN] Failed to poll fleet failures: %s", fErr) + } + if len(events) > 0 { + return fmt.Errorf("%s Recent failures:\n%+v", err, events) + } + + return err + } + + return resourceAwsGameliftFleetRead(d, meta) +} + +func resourceAwsGameliftFleetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + log.Printf("[INFO] Describing Gamelift Fleet: %s", d.Id()) + out, err := conn.DescribeFleetAttributes(&gamelift.DescribeFleetAttributesInput{ + FleetIds: aws.StringSlice([]string{d.Id()}), + }) + if err != nil { + return err + } + attributes := out.FleetAttributes + if len(attributes) < 1 { + log.Printf("[WARN] Gamelift Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if len(attributes) != 1 { + return fmt.Errorf("Expected exactly 1 Gamelift fleet, found %d under %q", + len(attributes), d.Id()) + } + fleet := attributes[0] + + d.Set("build_id", fleet.BuildId) + d.Set("description", fleet.Description) + d.Set("arn", fleet.FleetArn) + d.Set("log_paths", aws.StringValueSlice(fleet.LogPaths)) + d.Set("metric_groups", flattenStringList(fleet.MetricGroups)) + d.Set("name", fleet.Name) + d.Set("new_game_session_protection_policy", fleet.NewGameSessionProtectionPolicy) + d.Set("operating_system", fleet.OperatingSystem) + d.Set("resource_creation_limit_policy", flattenGameliftResourceCreationLimitPolicy(fleet.ResourceCreationLimitPolicy)) + + return nil +} + +func resourceAwsGameliftFleetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + log.Printf("[INFO] Updating Gamelift Fleet: %s", d.Id()) + + if d.HasChange("description") || d.HasChange("metric_groups") || d.HasChange("name") || + d.HasChange("new_game_session_protection_policy") || d.HasChange("resource_creation_limit_policy") { + _, err := conn.UpdateFleetAttributes(&gamelift.UpdateFleetAttributesInput{ + Description: aws.String(d.Get("description").(string)), + FleetId: aws.String(d.Id()), + MetricGroups: expandStringList(d.Get("metric_groups").([]interface{})), + Name: aws.String(d.Get("name").(string)), + NewGameSessionProtectionPolicy: aws.String(d.Get("new_game_session_protection_policy").(string)), + ResourceCreationLimitPolicy: expandGameliftResourceCreationLimitPolicy(d.Get("resource_creation_limit_policy").([]interface{})), + }) + if err != nil { + return err + } + } + + if d.HasChange("ec2_inbound_permission") { + oldPerms, newPerms := d.GetChange("ec2_inbound_permission") + authorizations, revocations := diffGameliftPortSettings(oldPerms.([]interface{}), newPerms.([]interface{})) + + _, err := conn.UpdateFleetPortSettings(&gamelift.UpdateFleetPortSettingsInput{ + FleetId: aws.String(d.Id()), + InboundPermissionAuthorizations: authorizations, + InboundPermissionRevocations: revocations, + }) + if err != nil { + return err + } + } + + if d.HasChange("runtime_configuration") { + _, err := conn.UpdateRuntimeConfiguration(&gamelift.UpdateRuntimeConfigurationInput{ + FleetId: aws.String(d.Id()), + RuntimeConfiguration: expandGameliftRuntimeConfiguration(d.Get("runtime_configuration").([]interface{})), + }) + if err != nil { + return err + } + } + + return resourceAwsGameliftFleetRead(d, meta) +} + +func resourceAwsGameliftFleetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + log.Printf("[INFO] Deleting Gamelift Fleet: %s", d.Id()) + // It can take ~ 1 hr as Gamelift will keep retrying on errors like + // invalid launch path and remain in state when it can't be deleted :/ + err := resource.Retry(60*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteFleet(&gamelift.DeleteFleetInput{ + FleetId: aws.String(d.Id()), + }) + if err != nil { + msg := fmt.Sprintf("Cannot delete fleet %s that is in status of ", d.Id()) + if isAWSErr(err, gamelift.ErrCodeInvalidRequestException, msg) { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return err + } + + return waitForGameliftFleetToBeDeleted(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) +} + +func waitForGameliftFleetToBeDeleted(conn *gamelift.GameLift, id string, timeout time.Duration) error { + stateConf := resource.StateChangeConf{ + Pending: []string{ + gamelift.FleetStatusActive, + gamelift.FleetStatusDeleting, + gamelift.FleetStatusError, + gamelift.FleetStatusTerminated, + }, + Target: []string{}, + Timeout: timeout, + Refresh: func() (interface{}, string, error) { + out, err := conn.DescribeFleetAttributes(&gamelift.DescribeFleetAttributesInput{ + FleetIds: aws.StringSlice([]string{id}), + }) + if err != nil { + return 42, "", err + } + + attributes := out.FleetAttributes + if len(attributes) < 1 { + return nil, "", nil + } + if len(attributes) != 1 { + return 42, "", fmt.Errorf("Expected exactly 1 Gamelift fleet, found %d under %q", + len(attributes), id) + } + + fleet := attributes[0] + return fleet, *fleet.Status, nil + }, + } + _, err := stateConf.WaitForState() + if err != nil { + events, fErr := getGameliftFleetFailures(conn, id) + if fErr != nil { + log.Printf("[WARN] Failed to poll fleet failures: %s", fErr) + } + if len(events) > 0 { + return fmt.Errorf("%s Recent failures:\n%+v", err, events) + } + } + return err +} + +func expandGameliftIpPermissions(cfgs []interface{}) []*gamelift.IpPermission { + if len(cfgs) < 1 { + return []*gamelift.IpPermission{} + } + + perms := make([]*gamelift.IpPermission, len(cfgs), len(cfgs)) + for i, rawCfg := range cfgs { + cfg := rawCfg.(map[string]interface{}) + perms[i] = expandGameliftIpPermission(cfg) + } + return perms +} + +func expandGameliftIpPermission(cfg map[string]interface{}) *gamelift.IpPermission { + return &gamelift.IpPermission{ + FromPort: aws.Int64(int64(cfg["from_port"].(int))), + IpRange: aws.String(cfg["ip_range"].(string)), + Protocol: aws.String(cfg["protocol"].(string)), + ToPort: aws.Int64(int64(cfg["to_port"].(int))), + } +} + +func flattenGameliftIpPermissions(ipps []*gamelift.IpPermission) []interface{} { + perms := make([]interface{}, len(ipps), len(ipps)) + + for i, ipp := range ipps { + m := make(map[string]interface{}, 0) + m["from_port"] = *ipp.FromPort + m["ip_range"] = *ipp.IpRange + m["protocol"] = *ipp.Protocol + m["to_port"] = *ipp.ToPort + perms[i] = m + } + + return perms +} + +func expandGameliftResourceCreationLimitPolicy(cfg []interface{}) *gamelift.ResourceCreationLimitPolicy { + if len(cfg) < 1 { + return nil + } + out := gamelift.ResourceCreationLimitPolicy{} + m := cfg[0].(map[string]interface{}) + + if v, ok := m["new_game_sessions_per_creator"]; ok { + out.NewGameSessionsPerCreator = aws.Int64(int64(v.(int))) + } + if v, ok := m["policy_period_in_minutes"]; ok { + out.PolicyPeriodInMinutes = aws.Int64(int64(v.(int))) + } + + return &out +} + +func flattenGameliftResourceCreationLimitPolicy(policy *gamelift.ResourceCreationLimitPolicy) []interface{} { + if policy == nil { + return []interface{}{} + } + + m := make(map[string]interface{}, 0) + m["new_game_sessions_per_creator"] = *policy.NewGameSessionsPerCreator + m["policy_period_in_minutes"] = *policy.PolicyPeriodInMinutes + + return []interface{}{m} +} + +func expandGameliftRuntimeConfiguration(cfg []interface{}) *gamelift.RuntimeConfiguration { + if len(cfg) < 1 { + return nil + } + out := gamelift.RuntimeConfiguration{} + m := cfg[0].(map[string]interface{}) + + if v, ok := m["game_session_activation_timeout_seconds"].(int); ok && v > 0 { + out.GameSessionActivationTimeoutSeconds = aws.Int64(int64(v)) + } + if v, ok := m["max_concurrent_game_session_activations"].(int); ok && v > 0 { + out.MaxConcurrentGameSessionActivations = aws.Int64(int64(v)) + } + if v, ok := m["server_process"]; ok { + out.ServerProcesses = expandGameliftServerProcesses(v.([]interface{})) + } + + return &out +} + +func expandGameliftServerProcesses(cfgs []interface{}) []*gamelift.ServerProcess { + if len(cfgs) < 1 { + return []*gamelift.ServerProcess{} + } + + processes := make([]*gamelift.ServerProcess, len(cfgs), len(cfgs)) + for i, rawCfg := range cfgs { + cfg := rawCfg.(map[string]interface{}) + process := &gamelift.ServerProcess{ + ConcurrentExecutions: aws.Int64(int64(cfg["concurrent_executions"].(int))), + LaunchPath: aws.String(cfg["launch_path"].(string)), + } + if v, ok := cfg["parameters"].(string); ok && len(v) > 0 { + process.Parameters = aws.String(v) + } + processes[i] = process + } + return processes +} + +func getGameliftFleetFailures(conn *gamelift.GameLift, id string) ([]*gamelift.Event, error) { + var events []*gamelift.Event + err := _getGameliftFleetFailures(conn, id, nil, &events) + return events, err +} + +func _getGameliftFleetFailures(conn *gamelift.GameLift, id string, nextToken *string, events *[]*gamelift.Event) error { + eOut, err := conn.DescribeFleetEvents(&gamelift.DescribeFleetEventsInput{ + FleetId: aws.String(id), + NextToken: nextToken, + }) + if err != nil { + return err + } + + for _, e := range eOut.Events { + if isGameliftEventFailure(e) { + *events = append(*events, e) + } + } + + if eOut.NextToken != nil { + err := _getGameliftFleetFailures(conn, id, nextToken, events) + if err != nil { + return err + } + } + + return nil +} + +func isGameliftEventFailure(event *gamelift.Event) bool { + failureCodes := []string{ + gamelift.EventCodeFleetActivationFailed, + gamelift.EventCodeFleetActivationFailedNoInstances, + gamelift.EventCodeFleetBinaryDownloadFailed, + gamelift.EventCodeFleetInitializationFailed, + gamelift.EventCodeFleetStateError, + gamelift.EventCodeFleetValidationExecutableRuntimeFailure, + gamelift.EventCodeFleetValidationLaunchPathNotFound, + gamelift.EventCodeFleetValidationTimedOut, + gamelift.EventCodeFleetVpcPeeringFailed, + gamelift.EventCodeGameSessionActivationTimeout, + gamelift.EventCodeServerProcessCrashed, + gamelift.EventCodeServerProcessForceTerminated, + gamelift.EventCodeServerProcessInvalidPath, + gamelift.EventCodeServerProcessProcessExitTimeout, + gamelift.EventCodeServerProcessProcessReadyTimeout, + gamelift.EventCodeServerProcessSdkInitializationTimeout, + gamelift.EventCodeServerProcessTerminatedUnhealthy, + } + for _, fc := range failureCodes { + if *event.EventCode == fc { + return true + } + } + return false +} + +func diffGameliftPortSettings(oldPerms, newPerms []interface{}) (a []*gamelift.IpPermission, r []*gamelift.IpPermission) { +OUTER: + for i, op := range oldPerms { + oldPerm := op.(map[string]interface{}) + for j, np := range newPerms { + newPerm := np.(map[string]interface{}) + + // Remove permissions which have not changed so we're not wasting + // API calls for removal & subseq. addition of the same ones + if reflect.DeepEqual(oldPerm, newPerm) { + oldPerms = append(oldPerms[:i], oldPerms[i+1:]...) + newPerms = append(newPerms[:j], newPerms[j+1:]...) + continue OUTER + } + } + + // Add what's left for revocation + r = append(r, expandGameliftIpPermission(oldPerm)) + } + + for _, np := range newPerms { + newPerm := np.(map[string]interface{}) + // Add what's left for authorization + a = append(a, expandGameliftIpPermission(newPerm)) + } + return +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go index 646eea6aace8..abb449986461 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_ssh_key.go @@ -68,10 +68,9 @@ func resourceAwsIamUserSshKeyCreate(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("Error creating IAM User SSH Key %s: %s", username, err) } - d.Set("ssh_public_key_id", createResp.SSHPublicKey.SSHPublicKeyId) d.SetId(*createResp.SSHPublicKey.SSHPublicKeyId) - return resourceAwsIamUserSshKeyRead(d, meta) + return resourceAwsIamUserSshKeyUpdate(d, meta) } func resourceAwsIamUserSshKeyRead(d *schema.ResourceData, meta interface{}) error { @@ -95,7 +94,7 @@ func resourceAwsIamUserSshKeyRead(d *schema.ResourceData, meta interface{}) erro d.Set("fingerprint", getResp.SSHPublicKey.Fingerprint) d.Set("status", getResp.SSHPublicKey.Status) - + d.Set("ssh_public_key_id", getResp.SSHPublicKey.SSHPublicKeyId) return nil } @@ -119,9 +118,8 @@ func resourceAwsIamUserSshKeyUpdate(d *schema.ResourceData, meta interface{}) er } return fmt.Errorf("Error updating IAM User SSH Key %s: %s", d.Id(), err) } - return resourceAwsIamUserRead(d, meta) } - return nil + return resourceAwsIamUserSshKeyRead(d, meta) } func resourceAwsIamUserSshKeyDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go index f5560814ec3a..aab29ccc8e2d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go @@ -35,7 +35,7 @@ func resourceAwsInstance() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), Update: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), }, Schema: map[string]*schema.Schema{ @@ -552,7 +552,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { stateConf := &resource.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"running"}, - Refresh: InstanceStateRefreshFunc(conn, *instance.InstanceId, "terminated"), + Refresh: InstanceStateRefreshFunc(conn, *instance.InstanceId, []string{"terminated", "shutting-down"}), Timeout: d.Timeout(schema.TimeoutCreate), Delay: 10 * time.Second, MinTimeout: 3 * time.Second, @@ -914,7 +914,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } - if d.HasChange("vpc_security_group_ids") { + if d.HasChange("vpc_security_group_ids") && !d.IsNewResource() { var groups []*string if v := d.Get("vpc_security_group_ids").(*schema.Set); v.Len() > 0 { for _, v := range v.List() { @@ -965,7 +965,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { stateConf := &resource.StateChangeConf{ Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, Target: []string{"stopped"}, - Refresh: InstanceStateRefreshFunc(conn, d.Id(), ""), + Refresh: InstanceStateRefreshFunc(conn, d.Id(), []string{}), Timeout: d.Timeout(schema.TimeoutUpdate), Delay: 10 * time.Second, MinTimeout: 3 * time.Second, @@ -996,7 +996,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { stateConf = &resource.StateChangeConf{ Pending: []string{"pending", "stopped"}, Target: []string{"running"}, - Refresh: InstanceStateRefreshFunc(conn, d.Id(), "terminated"), + Refresh: InstanceStateRefreshFunc(conn, d.Id(), []string{"terminated"}), Timeout: d.Timeout(schema.TimeoutUpdate), Delay: 10 * time.Second, MinTimeout: 3 * time.Second, @@ -1074,7 +1074,7 @@ func resourceAwsInstanceDelete(d *schema.ResourceData, meta interface{}) error { // InstanceStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch // an EC2 instance. -func InstanceStateRefreshFunc(conn *ec2.EC2, instanceID, failState string) resource.StateRefreshFunc { +func InstanceStateRefreshFunc(conn *ec2.EC2, instanceID string, failStates []string) resource.StateRefreshFunc { return func() (interface{}, string, error) { resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ InstanceIds: []*string{aws.String(instanceID)}, @@ -1098,10 +1098,11 @@ func InstanceStateRefreshFunc(conn *ec2.EC2, instanceID, failState string) resou i := resp.Reservations[0].Instances[0] state := *i.State.Name - if state == failState { - return i, state, fmt.Errorf("Failed to reach target state. Reason: %s", - stringifyStateReason(i.StateReason)) - + for _, failState := range failStates { + if state == failState { + return i, state, fmt.Errorf("Failed to reach target state. Reason: %s", + stringifyStateReason(i.StateReason)) + } } return i, state, nil @@ -1716,7 +1717,7 @@ func awsTerminateInstance(conn *ec2.EC2, id string, d *schema.ResourceData) erro stateConf := &resource.StateChangeConf{ Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, Target: []string{"terminated"}, - Refresh: InstanceStateRefreshFunc(conn, id, ""), + Refresh: InstanceStateRefreshFunc(conn, id, []string{}), Timeout: d.Timeout(schema.TimeoutDelete), Delay: 10 * time.Second, MinTimeout: 3 * time.Second, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go new file mode 100644 index 000000000000..5aa60465d89b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_type.go @@ -0,0 +1,202 @@ +package aws + +import ( + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iot" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +// https://docs.aws.amazon.com/iot/latest/apireference/API_CreateThingType.html +func resourceAwsIotThingType() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsIotThingTypeCreate, + Read: resourceAwsIotThingTypeRead, + Update: resourceAwsIotThingTypeUpdate, + Delete: resourceAwsIotThingTypeDelete, + + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + d.Set("name", d.Id()) + return []*schema.ResourceData{d}, nil + }, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateIotThingTypeName, + }, + "properties": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateIotThingTypeDescription, + }, + "searchable_attributes": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + ForceNew: true, + MaxItems: 3, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validateIotThingTypeSearchableAttribute, + }, + }, + }, + }, + }, + "deprecated": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsIotThingTypeCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + params := &iot.CreateThingTypeInput{ + ThingTypeName: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("properties"); ok { + configs := v.([]interface{}) + config, ok := configs[0].(map[string]interface{}) + + if ok && config != nil { + params.ThingTypeProperties = expandIotThingTypeProperties(config) + } + } + + log.Printf("[DEBUG] Creating IoT Thing Type: %s", params) + out, err := conn.CreateThingType(params) + + if err != nil { + return err + } + + d.SetId(*out.ThingTypeName) + + if v := d.Get("deprecated").(bool); v { + params := &iot.DeprecateThingTypeInput{ + ThingTypeName: aws.String(d.Id()), + UndoDeprecate: aws.Bool(false), + } + + log.Printf("[DEBUG] Deprecating IoT Thing Type: %s", params) + _, err := conn.DeprecateThingType(params) + + if err != nil { + return err + } + } + + return resourceAwsIotThingTypeRead(d, meta) +} + +func resourceAwsIotThingTypeRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + params := &iot.DescribeThingTypeInput{ + ThingTypeName: aws.String(d.Id()), + } + log.Printf("[DEBUG] Reading IoT Thing Type: %s", params) + out, err := conn.DescribeThingType(params) + + if err != nil { + if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] IoT Thing Type %q not found, removing from state", d.Id()) + d.SetId("") + } + return err + } + + if out.ThingTypeMetadata != nil { + d.Set("deprecated", out.ThingTypeMetadata.Deprecated) + } + + d.Set("arn", out.ThingTypeArn) + d.Set("properties", flattenIotThingTypeProperties(out.ThingTypeProperties)) + + return nil +} + +func resourceAwsIotThingTypeUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + if d.HasChange("deprecated") { + params := &iot.DeprecateThingTypeInput{ + ThingTypeName: aws.String(d.Id()), + UndoDeprecate: aws.Bool(!d.Get("deprecated").(bool)), + } + + log.Printf("[DEBUG] Updating IoT Thing Type: %s", params) + _, err := conn.DeprecateThingType(params) + + if err != nil { + return err + } + } + + return resourceAwsIotThingTypeRead(d, meta) +} + +func resourceAwsIotThingTypeDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + // In order to delete an IoT Thing Type, you must deprecate it first and wait + // at least 5 minutes. + deprecateParams := &iot.DeprecateThingTypeInput{ + ThingTypeName: aws.String(d.Id()), + } + log.Printf("[DEBUG] Deprecating IoT Thing Type: %s", deprecateParams) + _, err := conn.DeprecateThingType(deprecateParams) + + if err != nil { + return err + } + + deleteParams := &iot.DeleteThingTypeInput{ + ThingTypeName: aws.String(d.Id()), + } + log.Printf("[DEBUG] Deleting IoT Thing Type: %s", deleteParams) + + return resource.Retry(6*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteThingType(deleteParams) + + if err != nil { + if isAWSErr(err, iot.ErrCodeInvalidRequestException, "Please wait for 5 minutes after deprecation and then retry") { + return resource.RetryableError(err) + } + + // As the delay post-deprecation is about 5 minutes, it may have been + // deleted in between, thus getting a Not Found Exception. + if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { + return nil + } + + return resource.NonRetryableError(err) + } + + return nil + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go index f3e72689d949..1d4762f5fc05 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -9,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/firehose" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" @@ -1320,13 +1319,15 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) lastError = err - if awsErr, ok := err.(awserr.Error); ok { - // IAM roles can take ~10 seconds to propagate in AWS: - // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console - if awsErr.Code() == "InvalidArgumentException" && strings.Contains(awsErr.Message(), "Firehose is unable to assume role") { - log.Printf("[DEBUG] Firehose could not assume role referenced, retrying...") - return resource.RetryableError(awsErr) - } + // Retry for IAM eventual consistency + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to perform") { + return resource.RetryableError(err) + } + // IAM roles can take ~10 seconds to propagate in AWS: + // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Firehose is unable to assume role") { + log.Printf("[DEBUG] Firehose could not assume role referenced, retrying...") + return resource.RetryableError(err) } // Not retryable return resource.NonRetryableError(err) @@ -1335,10 +1336,7 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta return nil }) if err != nil { - if awsErr, ok := lastError.(awserr.Error); ok { - return fmt.Errorf("[WARN] Error creating Kinesis Firehose Delivery Stream: %s", awsErr.Error()) - } - return err + return fmt.Errorf("error creating Kinesis Firehose Delivery Stream: %s", err) } stateConf := &resource.StateChangeConf{ @@ -1459,14 +1457,12 @@ func resourceAwsKinesisFirehoseDeliveryStreamRead(d *schema.ResourceData, meta i }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } - return fmt.Errorf("[WARN] Error reading Kinesis Firehose Delivery Stream: %s", awsErr.Error()) + if isAWSErr(err, firehose.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Kinesis Firehose Delivery Stream (%s) not found, removing from state", d.Get("name").(string)) + d.SetId("") + return nil } - return err + return fmt.Errorf("error reading Kinesis Firehose Delivery Stream: %s", err) } s := resp.DeliveryStreamDescription @@ -1517,11 +1513,8 @@ func firehoseStreamStateRefreshFunc(conn *firehose.Firehose, sn string) resource } resp, err := conn.DescribeDeliveryStream(describeOpts) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "ResourceNotFoundException" { - return 42, "DESTROYED", nil - } - return nil, awsErr.Code(), err + if isAWSErr(err, firehose.ErrCodeResourceNotFoundException, "") { + return 42, "DESTROYED", nil } return nil, "failed", err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go index 9d73e192b5a3..6050df8d8060 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go @@ -200,7 +200,21 @@ func resourceAwsLambdaFunction() *schema.Resource { "tags": tagsSchema(), }, + + CustomizeDiff: updateComputedAttributesOnPublish, + } +} + +func updateComputedAttributesOnPublish(d *schema.ResourceDiff, meta interface{}) error { + if needsFunctionCodeUpdate(d) { + d.SetNewComputed("last_modified") + publish := d.Get("publish").(bool) + if publish { + d.SetNewComputed("version") + d.SetNewComputed("qualified_arn") + } } + return nil } // resourceAwsLambdaFunction maps to: @@ -525,6 +539,14 @@ func resourceAwsLambdaFunctionDelete(d *schema.ResourceData, meta interface{}) e return nil } +type resourceDiffer interface { + HasChange(string) bool +} + +func needsFunctionCodeUpdate(d resourceDiffer) bool { + return d.HasChange("filename") || d.HasChange("source_code_hash") || d.HasChange("s3_bucket") || d.HasChange("s3_key") || d.HasChange("s3_object_version") +} + // resourceAwsLambdaFunctionUpdate maps to: // UpdateFunctionCode in the API / SDK func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) error { @@ -672,7 +694,7 @@ func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) e d.SetPartial("timeout") } - if d.HasChange("filename") || d.HasChange("source_code_hash") || d.HasChange("s3_bucket") || d.HasChange("s3_key") || d.HasChange("s3_object_version") { + if needsFunctionCodeUpdate(d) { codeReq := &lambda.UpdateFunctionCodeInput{ FunctionName: aws.String(d.Id()), Publish: aws.Bool(d.Get("publish").(bool)), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go new file mode 100644 index 000000000000..39f32ad53ed2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_certificate.go @@ -0,0 +1,157 @@ +package aws + +import ( + "errors" + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/resource" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsLbListenerCertificate() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsLbListenerCertificateCreate, + Read: resourceAwsLbListenerCertificateRead, + Delete: resourceAwsLbListenerCertificateDelete, + + Schema: map[string]*schema.Schema{ + "listener_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "certificate_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsLbListenerCertificateCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).elbv2conn + + params := &elbv2.AddListenerCertificatesInput{ + ListenerArn: aws.String(d.Get("listener_arn").(string)), + Certificates: []*elbv2.Certificate{ + &elbv2.Certificate{ + CertificateArn: aws.String(d.Get("certificate_arn").(string)), + }, + }, + } + + log.Printf("[DEBUG] Adding certificate: %s of listener: %s", d.Get("certificate_arn").(string), d.Get("listener_arn").(string)) + resp, err := conn.AddListenerCertificates(params) + if err != nil { + return fmt.Errorf("Error creating LB Listener Certificate: %s", err) + } + + if len(resp.Certificates) == 0 { + return errors.New("Error creating LB Listener Certificate: no certificates returned in response") + } + + d.SetId(d.Get("listener_arn").(string) + "_" + d.Get("certificate_arn").(string)) + + return resourceAwsLbListenerCertificateRead(d, meta) +} + +func resourceAwsLbListenerCertificateRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).elbv2conn + + certificateArn := d.Get("certificate_arn").(string) + listenerArn := d.Get("listener_arn").(string) + + log.Printf("[DEBUG] Reading certificate: %s of listener: %s", certificateArn, listenerArn) + + var certificate *elbv2.Certificate + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + certificate, err = findAwsLbListenerCertificate(certificateArn, listenerArn, true, nil, conn) + if err != nil { + return resource.NonRetryableError(err) + } + + if certificate == nil { + err = fmt.Errorf("certificate not found: %s", certificateArn) + if d.IsNewResource() { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { + if certificate == nil { + log.Printf("[WARN] %s - removing from state", err) + d.SetId("") + return nil + } + return err + } + + return nil +} + +func resourceAwsLbListenerCertificateDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).elbv2conn + log.Printf("[DEBUG] Deleting certificate: %s of listener: %s", d.Get("certificate_arn").(string), d.Get("listener_arn").(string)) + + params := &elbv2.RemoveListenerCertificatesInput{ + ListenerArn: aws.String(d.Get("listener_arn").(string)), + Certificates: []*elbv2.Certificate{ + &elbv2.Certificate{ + CertificateArn: aws.String(d.Get("certificate_arn").(string)), + }, + }, + } + + _, err := conn.RemoveListenerCertificates(params) + if err != nil { + if isAWSErr(err, elbv2.ErrCodeCertificateNotFoundException, "") { + return nil + } + if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { + return nil + } + return fmt.Errorf("Error removing LB Listener Certificate: %s", err) + } + + return nil +} + +func findAwsLbListenerCertificate(certificateArn, listenerArn string, skipDefault bool, nextMarker *string, conn *elbv2.ELBV2) (*elbv2.Certificate, error) { + params := &elbv2.DescribeListenerCertificatesInput{ + ListenerArn: aws.String(listenerArn), + PageSize: aws.Int64(400), + } + if nextMarker != nil { + params.Marker = nextMarker + } + + resp, err := conn.DescribeListenerCertificates(params) + if err != nil { + return nil, err + } + + for _, cert := range resp.Certificates { + if skipDefault && *cert.IsDefault { + continue + } + + if *cert.CertificateArn == certificateArn { + return cert, nil + } + } + + if resp.NextMarker != nil { + return findAwsLbListenerCertificate(certificateArn, listenerArn, skipDefault, resp.NextMarker, conn) + } + return nil, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go index 020dc7d848d9..578d29e18e76 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go @@ -5,12 +5,15 @@ import ( "fmt" "log" "regexp" + "sort" "strconv" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -36,7 +39,8 @@ func resourceAwsLbbListenerRule() *schema.Resource { }, "priority": { Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, ForceNew: true, ValidateFunc: validateAwsLbListenerRulePriority, }, @@ -82,10 +86,10 @@ func resourceAwsLbbListenerRule() *schema.Resource { func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn + listenerArn := d.Get("listener_arn").(string) params := &elbv2.CreateRuleInput{ - ListenerArn: aws.String(d.Get("listener_arn").(string)), - Priority: aws.Int64(int64(d.Get("priority").(int))), + ListenerArn: aws.String(listenerArn), } actions := d.Get("action").([]interface{}) @@ -112,9 +116,34 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e } } - resp, err := elbconn.CreateRule(params) - if err != nil { - return errwrap.Wrapf("Error creating LB Listener Rule: {{err}}", err) + var resp *elbv2.CreateRuleOutput + if v, ok := d.GetOk("priority"); ok { + var err error + params.Priority = aws.Int64(int64(v.(int))) + resp, err = elbconn.CreateRule(params) + if err != nil { + return fmt.Errorf("Error creating LB Listener Rule: %v", err) + } + } else { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + var err error + priority, err := highestListenerRulePriority(elbconn, listenerArn) + if err != nil { + return resource.NonRetryableError(err) + } + params.Priority = aws.Int64(priority + 1) + resp, err = elbconn.CreateRule(params) + if err != nil { + if isAWSErr(err, elbv2.ErrCodePriorityInUseException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error creating LB Listener Rule: %v", err) + } } if len(resp.Rules) == 0 { @@ -157,7 +186,7 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err d.Set("priority", 99999) } else { if priority, err := strconv.Atoi(*rule.Priority); err != nil { - return errwrap.Wrapf("Cannot convert rule priority %q to int: {{err}}", err) + return fmt.Errorf("Cannot convert rule priority %q to int: {{err}}", err) } else { d.Set("priority", priority) } @@ -278,8 +307,8 @@ func resourceAwsLbListenerRuleDelete(d *schema.ResourceData, meta interface{}) e func validateAwsLbListenerRulePriority(v interface{}, k string) (ws []string, errors []error) { value := v.(int) - if value < 1 || value > 99999 { - errors = append(errors, fmt.Errorf("%q must be in the range 1-99999", k)) + if value < 1 || (value > 50000 && value != 99999) { + errors = append(errors, fmt.Errorf("%q must be in the range 1-50000 for normal rule or 99999 for default rule", k)) } return } @@ -312,3 +341,39 @@ func isRuleNotFound(err error) bool { elberr, ok := err.(awserr.Error) return ok && elberr.Code() == "RuleNotFound" } + +func highestListenerRulePriority(conn *elbv2.ELBV2, arn string) (priority int64, err error) { + var priorities []int + var nextMarker *string + + for { + out, aerr := conn.DescribeRules(&elbv2.DescribeRulesInput{ + ListenerArn: aws.String(arn), + Marker: nextMarker, + }) + if aerr != nil { + err = aerr + return + } + for _, rule := range out.Rules { + if *rule.Priority != "default" { + p, _ := strconv.Atoi(*rule.Priority) + priorities = append(priorities, p) + } + } + if out.NextMarker == nil { + break + } + nextMarker = out.NextMarker + } + + if len(priorities) == 0 { + priority = 0 + return + } + + sort.IntSlice(priorities).Sort() + priority = int64(priorities[len(priorities)-1]) + + return +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go index d45a77228a06..bfda18e3efa1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go @@ -330,7 +330,11 @@ func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) er }) } - if d.HasChange("stickiness") { + // In CustomizeDiff we allow LB stickiness to be declared for TCP target + // groups, so long as it's not enabled. This allows for better support for + // modules, but also means we need to completely skip sending the data to the + // API if it's defined on a TCP target group. + if d.HasChange("stickiness") && d.Get("protocol") != "TCP" { stickinessBlocks := d.Get("stickiness").([]interface{}) if len(stickinessBlocks) == 1 { stickiness := stickinessBlocks[0].(map[string]interface{}) @@ -541,8 +545,45 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t return errwrap.Wrapf("Error retrieving Target Group Attributes: {{err}}", err) } + // We only read in the stickiness attributes if the target group is not + // TCP-based. This ensures we don't end up causing a spurious diff if someone + // has defined the stickiness block on a TCP target group (albeit with + // false), for which this update would clobber the state coming from config + // for. + // + // This is a workaround to support module design where the module needs to + // support HTTP and TCP target groups. + switch { + case *targetGroup.Protocol != "TCP": + if err = flattenAwsLbTargetGroupStickiness(d, attrResp.Attributes); err != nil { + return err + } + case *targetGroup.Protocol == "TCP" && len(d.Get("stickiness").([]interface{})) < 1: + if err = d.Set("stickiness", []interface{}{}); err != nil { + return err + } + } + + tagsResp, err := elbconn.DescribeTags(&elbv2.DescribeTagsInput{ + ResourceArns: []*string{aws.String(d.Id())}, + }) + if err != nil { + return errwrap.Wrapf("Error retrieving Target Group Tags: {{err}}", err) + } + for _, t := range tagsResp.TagDescriptions { + if *t.ResourceArn == d.Id() { + if err := d.Set("tags", tagsToMapELBv2(t.Tags)); err != nil { + return err + } + } + } + + return nil +} + +func flattenAwsLbTargetGroupStickiness(d *schema.ResourceData, attributes []*elbv2.TargetGroupAttribute) error { stickinessMap := map[string]interface{}{} - for _, attr := range attrResp.Attributes { + for _, attr := range attributes { switch *attr.Key { case "stickiness.enabled": enabled, err := strconv.ParseBool(*attr.Value) @@ -574,21 +615,6 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t if err := d.Set("stickiness", setStickyMap); err != nil { return err } - - tagsResp, err := elbconn.DescribeTags(&elbv2.DescribeTagsInput{ - ResourceArns: []*string{aws.String(d.Id())}, - }) - if err != nil { - return errwrap.Wrapf("Error retrieving Target Group Tags: {{err}}", err) - } - for _, t := range tagsResp.TagDescriptions { - if *t.ResourceArn == d.Id() { - if err := d.Set("tags", tagsToMapELBv2(t.Tags)); err != nil { - return err - } - } - } - return nil } @@ -596,9 +622,11 @@ func resourceAwsLbTargetGroupCustomizeDiff(diff *schema.ResourceDiff, v interfac protocol := diff.Get("protocol").(string) if protocol == "TCP" { // TCP load balancers do not support stickiness - stickinessBlocks := diff.Get("stickiness").([]interface{}) - if len(stickinessBlocks) != 0 { - return fmt.Errorf("Network Load Balancers do not support Stickiness") + if stickinessBlocks := diff.Get("stickiness").([]interface{}); len(stickinessBlocks) == 1 { + stickiness := stickinessBlocks[0].(map[string]interface{}) + if val := stickiness["enabled"].(bool); val { + return fmt.Errorf("Network Load Balancers do not support Stickiness") + } } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go index 95284dbc9b8f..f76d76452d58 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go @@ -95,6 +95,11 @@ func resourceAwsRDSCluster() *schema.Resource { Computed: true, }, + "hosted_zone_id": { + Type: schema.TypeString, + Computed: true, + }, + "engine": { Type: schema.TypeString, Optional: true, @@ -249,6 +254,12 @@ func resourceAwsRDSCluster() *schema.Resource { Computed: true, }, + "source_region": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "tags": tagsSchema(), }, } @@ -408,6 +419,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error createOpts.KmsKeyId = aws.String(attr.(string)) } + if attr, ok := d.GetOk("source_region"); ok { + createOpts.SourceRegion = aws.String(attr.(string)) + } + log.Printf("[DEBUG] Create RDS Cluster as read replica: %s", createOpts) resp, err := conn.CreateDBCluster(createOpts) if err != nil { @@ -590,6 +605,7 @@ func flattenAwsRdsClusterResource(d *schema.ResourceData, meta interface{}, dbc d.Set("reader_endpoint", dbc.ReaderEndpoint) d.Set("replication_source_identifier", dbc.ReplicationSourceIdentifier) d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled) + d.Set("hosted_zone_id", dbc.HostedZoneId) var vpcg []string for _, g := range dbc.VpcSecurityGroups { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go index e73a8546c8af..7c212a7c7eac 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go @@ -176,6 +176,8 @@ func resourceAwsRDSClusterInstance() *schema.Resource { "availability_zone": { Type: schema.TypeString, + Optional: true, + ForceNew: true, Computed: true, }, @@ -211,6 +213,10 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ Tags: tags, } + if attr, ok := d.GetOk("availability_zone"); ok { + createOpts.AvailabilityZone = aws.String(attr.(string)) + } + if attr, ok := d.GetOk("db_parameter_group_name"); ok { createOpts.DBParameterGroupName = aws.String(attr.(string)) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go index c652b25ae511..b21161ee974a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go @@ -8,7 +8,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/redshift" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -484,7 +483,7 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) stateConf := &resource.StateChangeConf{ Pending: []string{"creating", "backing-up", "modifying", "restoring"}, Target: []string{"available"}, - Refresh: resourceAwsRedshiftClusterStateRefreshFunc(d, meta), + Refresh: resourceAwsRedshiftClusterStateRefreshFunc(d.Id(), conn), Timeout: 75 * time.Minute, MinTimeout: 10 * time.Second, } @@ -523,12 +522,10 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if "ClusterNotFound" == awsErr.Code() { - d.SetId("") - log.Printf("[DEBUG] Redshift Cluster (%s) not found", d.Id()) - return nil - } + if isAWSErr(err, redshift.ErrCodeClusterNotFoundFault, "") { + d.SetId("") + log.Printf("[DEBUG] Redshift Cluster (%s) not found", d.Id()) + return nil } log.Printf("[DEBUG] Error describing Redshift Cluster (%s)", d.Id()) return err @@ -766,7 +763,7 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) stateConf := &resource.StateChangeConf{ Pending: []string{"creating", "deleting", "rebooting", "resizing", "renaming", "modifying"}, Target: []string{"available"}, - Refresh: resourceAwsRedshiftClusterStateRefreshFunc(d, meta), + Refresh: resourceAwsRedshiftClusterStateRefreshFunc(d.Id(), conn), Timeout: 40 * time.Minute, MinTimeout: 10 * time.Second, } @@ -901,63 +898,63 @@ func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) } } - log.Printf("[DEBUG] Redshift Cluster delete options: %s", deleteOpts) + log.Printf("[DEBUG] Deleting Redshift Cluster: %s", deleteOpts) + _, err := deleteAwsRedshiftCluster(&deleteOpts, conn) + if err != nil { + return err + } + + log.Printf("[INFO] Redshift Cluster %s successfully deleted", d.Id()) + + return nil +} + +func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift.Redshift) (interface{}, error) { + id := *opts.ClusterIdentifier + log.Printf("[INFO] Deleting Redshift Cluster %q", id) err := resource.Retry(15*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteCluster(&deleteOpts) - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidClusterState" { + _, err := conn.DeleteCluster(opts) + if isAWSErr(err, redshift.ErrCodeInvalidClusterStateFault, "") { return resource.RetryableError(err) } return resource.NonRetryableError(err) }) - if err != nil { - return fmt.Errorf("[ERROR] Error deleting Redshift Cluster (%s): %s", d.Id(), err) + return nil, fmt.Errorf("[ERROR] Error deleting Redshift Cluster (%s): %s", + id, err) } stateConf := &resource.StateChangeConf{ Pending: []string{"available", "creating", "deleting", "rebooting", "resizing", "renaming", "final-snapshot"}, Target: []string{"destroyed"}, - Refresh: resourceAwsRedshiftClusterStateRefreshFunc(d, meta), + Refresh: resourceAwsRedshiftClusterStateRefreshFunc(id, conn), Timeout: 40 * time.Minute, MinTimeout: 5 * time.Second, } - // Wait, catching any errors - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("[ERROR] Error deleting Redshift Cluster (%s): %s", d.Id(), err) - } - - log.Printf("[INFO] Redshift Cluster %s successfully deleted", d.Id()) - - return nil + return stateConf.WaitForState() } -func resourceAwsRedshiftClusterStateRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { +func resourceAwsRedshiftClusterStateRefreshFunc(id string, conn *redshift.Redshift) resource.StateRefreshFunc { return func() (interface{}, string, error) { - conn := meta.(*AWSClient).redshiftconn - - log.Printf("[INFO] Reading Redshift Cluster Information: %s", d.Id()) + log.Printf("[INFO] Reading Redshift Cluster Information: %s", id) resp, err := conn.DescribeClusters(&redshift.DescribeClustersInput{ - ClusterIdentifier: aws.String(d.Id()), + ClusterIdentifier: aws.String(id), }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if "ClusterNotFound" == awsErr.Code() { - return 42, "destroyed", nil - } + if isAWSErr(err, redshift.ErrCodeClusterNotFoundFault, "") { + return 42, "destroyed", nil } - log.Printf("[WARN] Error on retrieving Redshift Cluster (%s) when waiting: %s", d.Id(), err) + log.Printf("[WARN] Error on retrieving Redshift Cluster (%s) when waiting: %s", id, err) return nil, "", err } var rsc *redshift.Cluster for _, c := range resp.Clusters { - if *c.ClusterIdentifier == d.Id() { + if *c.ClusterIdentifier == id { rsc = c } } @@ -967,7 +964,7 @@ func resourceAwsRedshiftClusterStateRefreshFunc(d *schema.ResourceData, meta int } if rsc.ClusterStatus != nil { - log.Printf("[DEBUG] Redshift Cluster status (%s): %s", d.Id(), *rsc.ClusterStatus) + log.Printf("[DEBUG] Redshift Cluster status (%s): %s", id, *rsc.ClusterStatus) } return rsc, *rsc.ClusterStatus, nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go index 7884b8a9fb31..322fe3fbe453 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go @@ -235,6 +235,12 @@ func resourceAwsRoute53Record() *schema.Resource { Optional: true, Set: schema.HashString, }, + + "allow_overwrite": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, }, } } @@ -382,6 +388,16 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er return err } + // Protect existing DNS records which might be managed in another way + // Use UPSERT only if the overwrite flag is true or if the current action is an update + // Else CREATE is used and fail if the same record exists + var action string + if d.Get("allow_overwrite").(bool) || !d.IsNewResource() { + action = "UPSERT" + } else { + action = "CREATE" + } + // Create the new records. We abuse StateChangeConf for this to // retry for us since Route53 sometimes returns errors about another // operation happening at the same time. @@ -389,7 +405,7 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er Comment: aws.String("Managed by Terraform"), Changes: []*route53.Change{ { - Action: aws.String("UPSERT"), + Action: aws.String(action), ResourceRecordSet: rec, }, }, @@ -922,5 +938,6 @@ func parseRecordId(id string) [4]string { } } } + recName = strings.TrimSuffix(recName, ".") return [4]string{recZone, recName, recType, recSet} } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go index abf4bc7a180e..a7af215eb467 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go @@ -373,6 +373,36 @@ func resourceAwsS3Bucket() *schema.Resource { Optional: true, ValidateFunc: validateS3BucketReplicationDestinationStorageClass, }, + "replica_kms_key_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "source_selection_criteria": { + Type: schema.TypeSet, + Optional: true, + MinItems: 1, + MaxItems: 1, + Set: sourceSelectionCriteriaHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "sse_kms_encrypted_objects": { + Type: schema.TypeSet, + Optional: true, + MinItems: 1, + MaxItems: 1, + Set: sourceSseKmsObjectsHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + }, + }, + }, }, }, }, @@ -970,19 +1000,17 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - replication := replicationResponse.(*s3.GetBucketReplicationOutput) if err != nil { if awsError, ok := err.(awserr.RequestFailure); ok && awsError.StatusCode() != 404 { return err } } + replication := replicationResponse.(*s3.GetBucketReplicationOutput) log.Printf("[DEBUG] S3 Bucket: %s, read replication configuration: %v", d.Id(), replication) - if r := replication.ReplicationConfiguration; r != nil { - if err := d.Set("replication_configuration", flattenAwsS3BucketReplicationConfiguration(replication.ReplicationConfiguration)); err != nil { - log.Printf("[DEBUG] Error setting replication configuration: %s", err) - return err - } + if err := d.Set("replication_configuration", flattenAwsS3BucketReplicationConfiguration(replication.ReplicationConfiguration)); err != nil { + log.Printf("[DEBUG] Error setting replication configuration: %s", err) + return err } // Read the bucket server side encryption configuration @@ -1019,10 +1047,10 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { }, ) }) - location := locationResponse.(*s3.GetBucketLocationOutput) if err != nil { return err } + location := locationResponse.(*s3.GetBucketLocationOutput) var region string if location.LocationConstraint != nil { region = *location.LocationConstraint @@ -1373,10 +1401,10 @@ func websiteEndpoint(s3conn *s3.S3, d *schema.ResourceData) (*S3Website, error) }, ) }) - location := locationResponse.(*s3.GetBucketLocationOutput) if err != nil { return nil, err } + location := locationResponse.(*s3.GetBucketLocationOutput) var region string if location.LocationConstraint != nil { region = *location.LocationConstraint @@ -1682,17 +1710,37 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. } ruleDestination := &s3.Destination{} - if destination, ok := rr["destination"]; ok { - dest := destination.(*schema.Set).List() - - bd := dest[0].(map[string]interface{}) + if dest, ok := rr["destination"].(*schema.Set); ok && dest.Len() > 0 { + bd := dest.List()[0].(map[string]interface{}) ruleDestination.Bucket = aws.String(bd["bucket"].(string)) if storageClass, ok := bd["storage_class"]; ok && storageClass != "" { ruleDestination.StorageClass = aws.String(storageClass.(string)) } + + if replicaKmsKeyId, ok := bd["replica_kms_key_id"]; ok && replicaKmsKeyId != "" { + ruleDestination.EncryptionConfiguration = &s3.EncryptionConfiguration{ + ReplicaKmsKeyID: aws.String(replicaKmsKeyId.(string)), + } + } } rcRule.Destination = ruleDestination + + if ssc, ok := rr["source_selection_criteria"].(*schema.Set); ok && ssc.Len() > 0 { + sscValues := ssc.List()[0].(map[string]interface{}) + ruleSsc := &s3.SourceSelectionCriteria{} + if sseKms, ok := sscValues["sse_kms_encrypted_objects"].(*schema.Set); ok && sseKms.Len() > 0 { + sseKmsValues := sseKms.List()[0].(map[string]interface{}) + sseKmsEncryptedObjects := &s3.SseKmsEncryptedObjects{} + if sseKmsValues["enabled"].(bool) { + sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusEnabled) + } else { + sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusDisabled) + } + ruleSsc.SseKmsEncryptedObjects = sseKmsEncryptedObjects + } + rcRule.SourceSelectionCriteria = ruleSsc + } rules = append(rules, rcRule) } @@ -1893,6 +1941,11 @@ func flattenAwsS3ServerSideEncryptionConfiguration(c *s3.ServerSideEncryptionCon func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) []map[string]interface{} { replication_configuration := make([]map[string]interface{}, 0, 1) + + if r == nil { + return replication_configuration + } + m := make(map[string]interface{}) if r.Role != nil && *r.Role != "" { @@ -1910,6 +1963,11 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) if v.Destination.StorageClass != nil { rd["storage_class"] = *v.Destination.StorageClass } + if v.Destination.EncryptionConfiguration != nil { + if v.Destination.EncryptionConfiguration.ReplicaKmsKeyID != nil { + rd["replica_kms_key_id"] = *v.Destination.EncryptionConfiguration.ReplicaKmsKeyID + } + } t["destination"] = schema.NewSet(destinationHash, []interface{}{rd}) } @@ -1922,6 +1980,19 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) if v.Status != nil { t["status"] = *v.Status } + if vssc := v.SourceSelectionCriteria; vssc != nil { + tssc := make(map[string]interface{}) + if vssc.SseKmsEncryptedObjects != nil { + tSseKms := make(map[string]interface{}) + if *vssc.SseKmsEncryptedObjects.Status == s3.SseKmsEncryptedObjectsStatusEnabled { + tSseKms["enabled"] = true + } else if *vssc.SseKmsEncryptedObjects.Status == s3.SseKmsEncryptedObjectsStatusDisabled { + tSseKms["enabled"] = false + } + tssc["sse_kms_encrypted_objects"] = schema.NewSet(sourceSseKmsObjectsHash, []interface{}{tSseKms}) + } + t["source_selection_criteria"] = schema.NewSet(sourceSelectionCriteriaHash, []interface{}{tssc}) + } rules = append(rules, t) } m["rules"] = schema.NewSet(rulesHash, rules) @@ -2083,6 +2154,12 @@ func rulesHash(v interface{}) int { if v, ok := m["status"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } + if v, ok := m["destination"].(*schema.Set); ok && v.Len() > 0 { + buf.WriteString(fmt.Sprintf("%d-", destinationHash(v.List()[0]))) + } + if v, ok := m["source_selection_criteria"].(*schema.Set); ok && v.Len() > 0 && v.List()[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", sourceSelectionCriteriaHash(v.List()[0]))) + } return hashcode.String(buf.String()) } @@ -2096,6 +2173,33 @@ func destinationHash(v interface{}) int { if v, ok := m["storage_class"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } + if v, ok := m["replica_kms_key_id"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + return hashcode.String(buf.String()) +} + +func sourceSelectionCriteriaHash(v interface{}) int { + // v is nil if empty source_selection_criteria is given. + if v == nil { + return 0 + } + var buf bytes.Buffer + m := v.(map[string]interface{}) + + if v, ok := m["sse_kms_encrypted_objects"].(*schema.Set); ok && v.Len() > 0 { + buf.WriteString(fmt.Sprintf("%d-", sourceSseKmsObjectsHash(v.List()[0]))) + } + return hashcode.String(buf.String()) +} + +func sourceSseKmsObjectsHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + + if v, ok := m["enabled"]; ok { + buf.WriteString(fmt.Sprintf("%t-", v.(bool))) + } return hashcode.String(buf.String()) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go new file mode 100644 index 000000000000..37ed7f137d08 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go @@ -0,0 +1,218 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsS3BucketMetric() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsS3BucketMetricPut, + Read: resourceAwsS3BucketMetricRead, + Update: resourceAwsS3BucketMetricPut, + Delete: resourceAwsS3BucketMetricDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "filter": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + "tags": tagsSchema(), + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsS3BucketMetricPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + bucket := d.Get("bucket").(string) + name := d.Get("name").(string) + + metricsConfiguration := &s3.MetricsConfiguration{ + Id: aws.String(name), + } + + if v, ok := d.GetOk("filter"); ok { + filterList := v.([]interface{}) + filterMap := filterList[0].(map[string]interface{}) + metricsConfiguration.Filter = expandS3MetricsFilter(filterMap) + } + + input := &s3.PutBucketMetricsConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + MetricsConfiguration: metricsConfiguration, + } + + log.Printf("[DEBUG] Putting metric configuration: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.PutBucketMetricsConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error putting S3 metric configuration: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", bucket, name)) + + return resourceAwsS3BucketMetricRead(d, meta) +} + +func resourceAwsS3BucketMetricDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + + bucket, name, err := resourceAwsS3BucketMetricParseID(d.Id()) + if err != nil { + return err + } + + input := &s3.DeleteBucketMetricsConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + + log.Printf("[DEBUG] Deleting S3 bucket metric configuration: %s", input) + _, err = conn.DeleteBucketMetricsConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + log.Printf("[WARN] %s S3 bucket metrics configuration not found, removing from state.", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error deleting S3 metric configuration: %s", err) + } + + d.SetId("") + return nil +} + +func resourceAwsS3BucketMetricRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + + bucket, name, err := resourceAwsS3BucketMetricParseID(d.Id()) + if err != nil { + return err + } + + d.Set("bucket", bucket) + d.Set("name", name) + + input := &s3.GetBucketMetricsConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + + log.Printf("[DEBUG] Reading S3 bucket metrics configuration: %s", input) + output, err := conn.GetBucketMetricsConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + log.Printf("[WARN] %s S3 bucket metrics configuration not found, removing from state.", d.Id()) + d.SetId("") + return nil + } + return err + } + + if output.MetricsConfiguration.Filter != nil { + if err := d.Set("filter", []interface{}{flattenS3MetricsFilter(output.MetricsConfiguration.Filter)}); err != nil { + return err + } + } + + return nil +} + +func expandS3MetricsFilter(m map[string]interface{}) *s3.MetricsFilter { + var prefix string + if v, ok := m["prefix"]; ok { + prefix = v.(string) + } + + var tags []*s3.Tag + if v, ok := m["tags"]; ok { + tags = tagsFromMapS3(v.(map[string]interface{})) + } + + metricsFilter := &s3.MetricsFilter{} + if prefix != "" && len(tags) > 0 { + metricsFilter.And = &s3.MetricsAndOperator{ + Prefix: aws.String(prefix), + Tags: tags, + } + } else if len(tags) > 1 { + metricsFilter.And = &s3.MetricsAndOperator{ + Tags: tags, + } + } else if len(tags) == 1 { + metricsFilter.Tag = tags[0] + } else { + metricsFilter.Prefix = aws.String(prefix) + } + return metricsFilter +} + +func flattenS3MetricsFilter(metricsFilter *s3.MetricsFilter) map[string]interface{} { + m := make(map[string]interface{}) + + if metricsFilter.And != nil { + and := *metricsFilter.And + if and.Prefix != nil { + m["prefix"] = *and.Prefix + } + if and.Tags != nil { + m["tags"] = tagsToMapS3(and.Tags) + } + } else if metricsFilter.Prefix != nil { + m["prefix"] = *metricsFilter.Prefix + } else if metricsFilter.Tag != nil { + tags := []*s3.Tag{ + metricsFilter.Tag, + } + m["tags"] = tagsToMapS3(tags) + } + return m +} + +func resourceAwsS3BucketMetricParseID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("please make sure the ID is in the form BUCKET:NAME (i.e. my-bucket:EntireBucket") + } + bucket := idParts[0] + name := idParts[1] + return bucket, name, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go index 167b51ab7444..38f07bb73779 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go @@ -52,14 +52,29 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Required: true, }, "type": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateServiceDiscoveryServiceDnsRecordsType, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateStringIn( + servicediscovery.RecordTypeSrv, + servicediscovery.RecordTypeA, + servicediscovery.RecordTypeAaaa, + servicediscovery.RecordTypeCname, + ), }, }, }, }, + "routing_policy": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: servicediscovery.RoutingPolicyMultivalue, + ValidateFunc: validateStringIn( + servicediscovery.RoutingPolicyMultivalue, + servicediscovery.RoutingPolicyWeighted, + ), + }, }, }, }, @@ -78,10 +93,14 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Optional: true, }, "type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateServiceDiscoveryServiceHealthCheckConfigType, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateStringIn( + servicediscovery.HealthCheckTypeHttp, + servicediscovery.HealthCheckTypeHttps, + servicediscovery.HealthCheckTypeTcp, + ), }, }, }, @@ -220,6 +239,9 @@ func expandServiceDiscoveryDnsConfig(configured map[string]interface{}) *service drs[i] = dr } result.DnsRecords = drs + if v, ok := configured["routing_policy"]; ok && v != "" { + result.RoutingPolicy = aws.String(v.(string)) + } return result } @@ -228,6 +250,7 @@ func flattenServiceDiscoveryDnsConfig(config *servicediscovery.DnsConfig) []map[ result := map[string]interface{}{} result["namespace_id"] = *config.NamespaceId + result["routing_policy"] = *config.RoutingPolicy drs := make([]map[string]interface{}, 0) for _, v := range config.DnsRecords { dr := map[string]interface{}{} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service_migrate.go new file mode 100644 index 000000000000..d0fd571f7c53 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service_migrate.go @@ -0,0 +1,36 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/terraform/terraform" +) + +func resourceAwsServiceDiscoveryServiceMigrateState( + v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { + switch v { + case 0: + log.Println("[INFO] Found AWS ServiceDiscovery Service State v0; migrating to v1") + return migrateServiceDiscoveryServiceStateV0toV1(is) + default: + return is, fmt.Errorf("Unexpected schema version: %d", v) + } +} + +func migrateServiceDiscoveryServiceStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { + if is.Empty() { + log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") + return is, nil + } + + log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) + + if v, ok := is.Attributes["dns_config.0.routing_policy"]; !ok && v == "" { + is.Attributes["dns_config.0.routing_policy"] = servicediscovery.RoutingPolicyMultivalue + } + + log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) + return is, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go new file mode 100644 index 000000000000..c7361a607607 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go @@ -0,0 +1,110 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ses" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSesDomainMailFrom() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSesDomainMailFromSet, + Read: resourceAwsSesDomainMailFromRead, + Update: resourceAwsSesDomainMailFromSet, + Delete: resourceAwsSesDomainMailFromDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "mail_from_domain": { + Type: schema.TypeString, + Required: true, + }, + "behavior_on_mx_failure": { + Type: schema.TypeString, + Optional: true, + Default: ses.BehaviorOnMXFailureUseDefaultValue, + }, + }, + } +} + +func resourceAwsSesDomainMailFromSet(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + behaviorOnMxFailure := d.Get("behavior_on_mx_failure").(string) + domainName := d.Get("domain").(string) + mailFromDomain := d.Get("mail_from_domain").(string) + + input := &ses.SetIdentityMailFromDomainInput{ + BehaviorOnMXFailure: aws.String(behaviorOnMxFailure), + Identity: aws.String(domainName), + MailFromDomain: aws.String(mailFromDomain), + } + + _, err := conn.SetIdentityMailFromDomain(input) + if err != nil { + return fmt.Errorf("Error setting MAIL FROM domain: %s", err) + } + + d.SetId(domainName) + + return resourceAwsSesDomainMailFromRead(d, meta) +} + +func resourceAwsSesDomainMailFromRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + domainName := d.Id() + + readOpts := &ses.GetIdentityMailFromDomainAttributesInput{ + Identities: []*string{ + aws.String(domainName), + }, + } + + out, err := conn.GetIdentityMailFromDomainAttributes(readOpts) + if err != nil { + log.Printf("error fetching MAIL FROM domain attributes for %s: %s", domainName, err) + return err + } + + d.Set("domain", domainName) + + if v, ok := out.MailFromDomainAttributes[domainName]; ok { + d.Set("behavior_on_mx_failure", v.BehaviorOnMXFailure) + d.Set("mail_from_domain", v.MailFromDomain) + } else { + d.Set("behavior_on_mx_failure", v.BehaviorOnMXFailure) + d.Set("mail_from_domain", "") + } + + return nil +} + +func resourceAwsSesDomainMailFromDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + domainName := d.Id() + + deleteOpts := &ses.SetIdentityMailFromDomainInput{ + Identity: aws.String(domainName), + MailFromDomain: nil, + } + + _, err := conn.SetIdentityMailFromDomain(deleteOpts) + if err != nil { + return fmt.Errorf("Error deleting SES domain identity: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go index 2f8a55f4c841..3fba83d9a0d2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go @@ -6,9 +6,7 @@ import ( "strings" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/sns" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -16,22 +14,23 @@ import ( // Mutable attributes var SNSAttributeMap = map[string]string{ - "arn": "TopicArn", - "display_name": "DisplayName", - "policy": "Policy", - "delivery_policy": "DeliveryPolicy", + "application_failure_feedback_role_arn": "ApplicationFailureFeedbackRoleArn", "application_success_feedback_role_arn": "ApplicationSuccessFeedbackRoleArn", "application_success_feedback_sample_rate": "ApplicationSuccessFeedbackSampleRate", - "application_failure_feedback_role_arn": "ApplicationFailureFeedbackRoleArn", - "http_success_feedback_role_arn": "HTTPSuccessFeedbackRoleArn", - "http_success_feedback_sample_rate": "HTTPSuccessFeedbackSampleRate", - "http_failure_feedback_role_arn": "HTTPFailureFeedbackRoleArn", - "lambda_success_feedback_role_arn": "LambdaSuccessFeedbackRoleArn", - "lambda_success_feedback_sample_rate": "LambdaSuccessFeedbackSampleRate", - "lambda_failure_feedback_role_arn": "LambdaFailureFeedbackRoleArn", - "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", - "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", - "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn"} + "arn": "TopicArn", + "delivery_policy": "DeliveryPolicy", + "display_name": "DisplayName", + "http_failure_feedback_role_arn": "HTTPFailureFeedbackRoleArn", + "http_success_feedback_role_arn": "HTTPSuccessFeedbackRoleArn", + "http_success_feedback_sample_rate": "HTTPSuccessFeedbackSampleRate", + "lambda_failure_feedback_role_arn": "LambdaFailureFeedbackRoleArn", + "lambda_success_feedback_role_arn": "LambdaSuccessFeedbackRoleArn", + "lambda_success_feedback_sample_rate": "LambdaSuccessFeedbackSampleRate", + "policy": "Policy", + "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn", + "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", + "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", +} func resourceAwsSnsTopic() *schema.Resource { return &schema.Resource{ @@ -44,24 +43,23 @@ func resourceAwsSnsTopic() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Optional: true, Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, }, - "name_prefix": &schema.Schema{ + "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, }, - "display_name": &schema.Schema{ + "display_name": { Type: schema.TypeString, Optional: true, - ForceNew: false, }, - "policy": &schema.Schema{ + "policy": { Type: schema.TypeString, Optional: true, Computed: true, @@ -72,7 +70,7 @@ func resourceAwsSnsTopic() *schema.Resource { return json }, }, - "delivery_policy": &schema.Schema{ + "delivery_policy": { Type: schema.TypeString, Optional: true, ForceNew: false, @@ -135,7 +133,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, }, - "arn": &schema.Schema{ + "arn": { Type: schema.TypeString, Computed: true, }, @@ -168,37 +166,18 @@ func resourceAwsSnsTopicCreate(d *schema.ResourceData, meta interface{}) error { d.SetId(*output.TopicArn) - // Write the ARN to the 'arn' field for export - d.Set("arn", *output.TopicArn) - return resourceAwsSnsTopicUpdate(d, meta) } func resourceAwsSnsTopicUpdate(d *schema.ResourceData, meta interface{}) error { - r := *resourceAwsSnsTopic() + conn := meta.(*AWSClient).snsconn - for k, _ := range r.Schema { - if attrKey, ok := SNSAttributeMap[k]; ok { - if d.HasChange(k) { - log.Printf("[DEBUG] Updating %s", attrKey) - _, n := d.GetChange(k) - // Ignore an empty policy - if !(k == "policy" && n == "") { - // Make API call to update attributes - req := sns.SetTopicAttributesInput{ - TopicArn: aws.String(d.Id()), - AttributeName: aws.String(attrKey), - AttributeValue: aws.String(fmt.Sprintf("%v", n)), - } - conn := meta.(*AWSClient).snsconn - // Retry the update in the event of an eventually consistent style of - // error, where say an IAM resource is successfully created but not - // actually available. See https://github.com/hashicorp/terraform/issues/3660 - _, err := retryOnAwsCode("InvalidParameter", func() (interface{}, error) { - return conn.SetTopicAttributes(&req) - }) - return err - } + for terraformAttrName, snsAttrName := range SNSAttributeMap { + if d.HasChange(terraformAttrName) { + _, terraformAttrValue := d.GetChange(terraformAttrName) + err := updateAwsSnsTopicAttribute(d.Id(), snsAttrName, terraformAttrValue, conn) + if err != nil { + return err } } } @@ -209,11 +188,12 @@ func resourceAwsSnsTopicUpdate(d *schema.ResourceData, meta interface{}) error { func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error { snsconn := meta.(*AWSClient).snsconn + log.Printf("[DEBUG] Reading SNS Topic Attributes for %s", d.Id()) attributeOutput, err := snsconn.GetTopicAttributes(&sns.GetTopicAttributesInput{ TopicArn: aws.String(d.Id()), }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFound" { + if isAWSErr(err, sns.ErrCodeNotFoundException, "") { log.Printf("[WARN] SNS Topic (%s) not found, error code (404)", d.Id()) d.SetId("") return nil @@ -224,28 +204,12 @@ func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error { if attributeOutput.Attributes != nil && len(attributeOutput.Attributes) > 0 { attrmap := attributeOutput.Attributes - resource := *resourceAwsSnsTopic() - // iKey = internal struct key, oKey = AWS Attribute Map key - for iKey, oKey := range SNSAttributeMap { - log.Printf("[DEBUG] Reading %s => %s", iKey, oKey) - - if attrmap[oKey] != nil { - // Some of the fetched attributes are stateful properties such as - // the number of subscriptions, the owner, etc. skip those - if resource.Schema[iKey] != nil { - var value string - if iKey == "policy" { - value, err = structure.NormalizeJsonString(*attrmap[oKey]) - if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) - } - } else { - value = *attrmap[oKey] - } - log.Printf("[DEBUG] Reading %s => %s -> %s", iKey, oKey, value) - d.Set(iKey, value) - } - } + for terraformAttrName, snsAttrName := range SNSAttributeMap { + d.Set(terraformAttrName, attrmap[snsAttrName]) + } + } else { + for terraformAttrName, _ := range SNSAttributeMap { + d.Set(terraformAttrName, "") } } @@ -275,3 +239,29 @@ func resourceAwsSnsTopicDelete(d *schema.ResourceData, meta interface{}) error { } return nil } + +func updateAwsSnsTopicAttribute(topicArn, name string, value interface{}, conn *sns.SNS) error { + // Ignore an empty policy + if name == "Policy" && value == "" { + return nil + } + log.Printf("[DEBUG] Updating SNS Topic Attribute: %s", name) + + // Make API call to update attributes + req := sns.SetTopicAttributesInput{ + TopicArn: aws.String(topicArn), + AttributeName: aws.String(name), + AttributeValue: aws.String(fmt.Sprintf("%v", value)), + } + + // Retry the update in the event of an eventually consistent style of + // error, where say an IAM resource is successfully created but not + // actually available. See https://github.com/hashicorp/terraform/issues/3660 + _, err := retryOnAwsCode(sns.ErrCodeInvalidParameterException, func() (interface{}, error) { + return conn.SetTopicAttributes(&req) + }) + if err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go index 93984d06a95a..ec2779c0c348 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go @@ -31,9 +31,10 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Schema: map[string]*schema.Schema{ "iam_fleet_role": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, }, "replace_unhealthy_instances": { Type: schema.TypeBool, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go index 0a0e79b9b815..b5c298a1bc15 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go @@ -21,7 +21,7 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), }, Schema: func() map[string]*schema.Schema { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go index 0ef10e9f154e..164c99d1d9b1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go @@ -53,6 +53,7 @@ func resourceAwsSqsQueue() *schema.Resource { ForceNew: true, Computed: true, ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateSQSQueueName, }, "name_prefix": { Type: schema.TypeString, @@ -149,7 +150,7 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Error validating the FIFO queue name: %v", errors) } } else { - if errors := validateSQSQueueName(name, "name"); len(errors) > 0 { + if errors := validateSQSNonFifoQueueName(name, "name"); len(errors) > 0 { return fmt.Errorf("Error validating SQS queue name: %v", errors) } } @@ -311,13 +312,17 @@ func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { d.Set("fifo_queue", d.Get("fifo_queue").(bool)) d.Set("content_based_deduplication", d.Get("content_based_deduplication").(bool)) - listTagsOutput, err := sqsconn.ListQueueTags(&sqs.ListQueueTagsInput{ - QueueUrl: aws.String(d.Id()), - }) - if err != nil { - return err + tags := make(map[string]string) + if !meta.(*AWSClient).IsGovCloud() { + listTagsOutput, err := sqsconn.ListQueueTags(&sqs.ListQueueTagsInput{ + QueueUrl: aws.String(d.Id()), + }) + if err != nil { + return err + } + tags = tagsToMapGeneric(listTagsOutput.Tags) } - d.Set("tags", tagsToMapGeneric(listTagsOutput.Tags)) + d.Set("tags", tags) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go index e376c715f7d7..d6d82021f2a1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go @@ -73,7 +73,6 @@ func resourceAwsSsmAssociation() *schema.Resource { "targets": { Type: schema.TypeList, Optional: true, - ForceNew: true, Computed: true, MaxItems: 5, Elem: &schema.Resource{ @@ -213,6 +212,10 @@ func resourceAwsSsmAssocationUpdate(d *schema.ResourceData, meta interface{}) er associationInput.OutputLocation = expandSSMAssociationOutputLocation(d.Get("output_location").([]interface{})) } + if d.HasChange("targets") { + associationInput.Targets = expandAwsSsmTargets(d) + } + _, err := ssmconn.UpdateAssociation(associationInput) if err != nil { return errwrap.Wrapf("[ERROR] Error updating SSM association: {{err}}", err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go index 49bf001ec7af..7049fa61c79c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go @@ -82,7 +82,7 @@ func resourceAwsVolumeAttachmentCreate(d *schema.ResourceData, meta interface{}) stateConf := &resource.StateChangeConf{ Pending: []string{"pending", "stopping"}, Target: []string{"running", "stopped"}, - Refresh: InstanceStateRefreshFunc(conn, iID, "terminated"), + Refresh: InstanceStateRefreshFunc(conn, iID, []string{"terminated"}), Timeout: 10 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go index 96f26a17e762..e8a895332d71 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go @@ -257,7 +257,7 @@ func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) erro } stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "deleting"}, + Pending: []string{"available", "pending", "deleting"}, Target: []string{"deleted"}, Refresh: vpcEndpointStateRefresh(conn, d.Id()), Timeout: 10 * time.Minute, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go index f5357255c7aa..45964e2da5ba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go @@ -109,7 +109,7 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { pcRaw, status, err := resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id())() // Allow a failed VPC Peering Connection to fallthrough, // to allow rest of the logic below to do its work. - if err != nil && status != "failed" { + if err != nil && status != ec2.VpcPeeringConnectionStateReasonCodeFailed { return err } @@ -125,11 +125,11 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { // just "falls off" the console. See GH-2322 if pc.Status != nil { status := map[string]bool{ - "deleted": true, - "deleting": true, - "expired": true, - "failed": true, - "rejected": true, + ec2.VpcPeeringConnectionStateReasonCodeDeleted: true, + ec2.VpcPeeringConnectionStateReasonCodeDeleting: true, + ec2.VpcPeeringConnectionStateReasonCodeExpired: true, + ec2.VpcPeeringConnectionStateReasonCodeFailed: true, + ec2.VpcPeeringConnectionStateReasonCodeRejected: true, } if _, ok := status[*pc.Status.Code]; ok { log.Printf("[DEBUG] VPC Peering Connection (%s) in state (%s), removing.", @@ -249,7 +249,7 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error pc := pcRaw.(*ec2.VpcPeeringConnection) if _, ok := d.GetOk("auto_accept"); ok { - if pc.Status != nil && *pc.Status.Code == "pending-acceptance" { + if pc.Status != nil && *pc.Status.Code == ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance { status, err := resourceVPCPeeringConnectionAccept(conn, d.Id()) if err != nil { return errwrap.Wrapf("Unable to accept VPC Peering Connection: {{err}}", err) @@ -290,8 +290,14 @@ func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error // Wait for the vpc peering connection to become available log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to delete.", d.Id()) stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{"rejecting", "deleted"}, + Pending: []string{ + ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance, + ec2.VpcPeeringConnectionStateReasonCodeDeleting, + }, + Target: []string{ + ec2.VpcPeeringConnectionStateReasonCodeRejected, + ec2.VpcPeeringConnectionStateReasonCodeDeleted, + }, Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id()), Timeout: 1 * time.Minute, } @@ -408,8 +414,14 @@ func checkVpcPeeringConnectionAvailable(conn *ec2.EC2, id string) error { // Wait for the vpc peering connection to become available log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to become available.", id) stateConf := &resource.StateChangeConf{ - Pending: []string{"initiating-request", "provisioning", "pending"}, - Target: []string{"pending-acceptance", "active"}, + Pending: []string{ + ec2.VpcPeeringConnectionStateReasonCodeInitiatingRequest, + ec2.VpcPeeringConnectionStateReasonCodeProvisioning, + }, + Target: []string{ + ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance, + ec2.VpcPeeringConnectionStateReasonCodeActive, + }, Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, id), Timeout: 1 * time.Minute, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go index ca85a8f9c9aa..39a0ad00db58 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go @@ -19,6 +19,7 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentity" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" + "github.com/aws/aws-sdk-go/service/dax" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -854,6 +855,16 @@ func flattenElastiCacheSecurityGroupIds(securityGroups []*elasticache.SecurityGr return result } +func flattenDaxSecurityGroupIds(securityGroups []*dax.SecurityGroupMembership) []string { + result := make([]string, 0, len(securityGroups)) + for _, sg := range securityGroups { + if sg.SecurityGroupIdentifier != nil { + result = append(result, *sg.SecurityGroupIdentifier) + } + } + return result +} + // Flattens step adjustments into a list of map[string]interface. func flattenStepAdjustments(adjustments []*autoscaling.StepAdjustment) []map[string]interface{} { result := make([]map[string]interface{}, 0, len(adjustments)) @@ -3667,3 +3678,30 @@ func flattenDynamoDbTableItemAttributes(attrs map[string]*dynamodb.AttributeValu return rawBuffer.String(), nil } + +func expandIotThingTypeProperties(config map[string]interface{}) *iot.ThingTypeProperties { + properties := &iot.ThingTypeProperties{ + SearchableAttributes: expandStringList(config["searchable_attributes"].(*schema.Set).List()), + } + + if v, ok := config["description"]; ok && v.(string) != "" { + properties.ThingTypeDescription = aws.String(v.(string)) + } + + return properties +} + +func flattenIotThingTypeProperties(s *iot.ThingTypeProperties) []map[string]interface{} { + m := map[string]interface{}{} + + if s == nil { + return nil + } + + if s.ThingTypeDescription != nil { + m["description"] = *s.ThingTypeDescription + } + m["searchable_attributes"] = flattenStringList(s.SearchableAttributes) + + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go new file mode 100644 index 000000000000..81674450383a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go @@ -0,0 +1,115 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/schema" +) + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsDax(conn *dax.DAX, d *schema.ResourceData, arn string) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsDax(tagsFromMapDax(o), tagsFromMapDax(n)) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + k := make([]*string, len(remove), len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.UntagResource(&dax.UntagResourceInput{ + ResourceName: aws.String(arn), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagResource(&dax.TagResourceInput{ + ResourceName: aws.String(arn), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsDax(oldTags, newTags []*dax.Tag) ([]*dax.Tag, []*dax.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[*t.Key] = *t.Value + } + + // Build the list of what to remove + var remove []*dax.Tag + for _, t := range oldTags { + old, ok := create[*t.Key] + if !ok || old != *t.Value { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapDax(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapDax(m map[string]interface{}) []*dax.Tag { + result := make([]*dax.Tag, 0, len(m)) + for k, v := range m { + t := &dax.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredDax(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapDax(ts []*dax.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredDax(t) { + result[*t.Key] = *t.Value + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredDax(t *dax.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go new file mode 100644 index 000000000000..ca353a857e35 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go @@ -0,0 +1,137 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +// getTags is a helper to get the tags for a resource. It expects the +// tags field to be named "tags" +func getTagsDX(conn *directconnect.DirectConnect, d *schema.ResourceData, arn string) error { + resp, err := conn.DescribeTags(&directconnect.DescribeTagsInput{ + ResourceArns: aws.StringSlice([]string{arn}), + }) + if err != nil { + return err + } + + var tags []*directconnect.Tag + if len(resp.ResourceTags) == 1 && aws.StringValue(resp.ResourceTags[0].ResourceArn) == arn { + tags = resp.ResourceTags[0].Tags + } + + if err := d.Set("tags", tagsToMapDX(tags)); err != nil { + return err + } + + return nil +} + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsDX(conn *directconnect.DirectConnect, d *schema.ResourceData, arn string) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsDX(tagsFromMapDX(o), tagsFromMapDX(n)) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + k := make([]*string, len(remove), len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.UntagResource(&directconnect.UntagResourceInput{ + ResourceArn: aws.String(arn), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagResource(&directconnect.TagResourceInput{ + ResourceArn: aws.String(arn), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsDX(oldTags, newTags []*directconnect.Tag) ([]*directconnect.Tag, []*directconnect.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*directconnect.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapDX(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapDX(m map[string]interface{}) []*directconnect.Tag { + result := make([]*directconnect.Tag, 0, len(m)) + for k, v := range m { + t := &directconnect.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredDX(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapDX(ts []*directconnect.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredDX(t) { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredDX(t *directconnect.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go index 990f90b36a85..3199e3229e9e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go @@ -24,9 +24,10 @@ import ( func validateInstanceUserDataSize(v interface{}, k string) (ws []string, errors []error) { value := v.(string) + length := len(value) - if len(value) > 16384 { - errors = append(errors, fmt.Errorf("%q cannot be longer than 16384 bytes", k)) + if length > 16384 { + errors = append(errors, fmt.Errorf("%q is %d bytes, cannot be longer than 16384 bytes", k, length)) } return } @@ -80,8 +81,8 @@ func validateRdsEngine(v interface{}, k string) (ws []string, errors []error) { if _, ok := validTypes[value]; !ok { errors = append(errors, fmt.Errorf( - "%q contains an invalid engine type %q. Valid types are either %q or %q.", - k, value, "aurora", "aurora-postgresql")) + "%q contains an invalid engine type %q. Valid types are either %q, %q or %q.", + k, value, "aurora", "aurora-mysql", "aurora-postgresql")) } return } @@ -135,9 +136,9 @@ func validateTagFilters(v interface{}, k string) (ws []string, errors []error) { func validateDbParamGroupName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-_]+$`).MatchString(value) { + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, underscores and hyphens allowed in %q", k)) + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) } if !regexp.MustCompile(`^[a-z]`).MatchString(value) { errors = append(errors, fmt.Errorf( @@ -147,10 +148,6 @@ func validateDbParamGroupName(v interface{}, k string) (ws []string, errors []er errors = append(errors, fmt.Errorf( "%q cannot contain two consecutive hyphens", k)) } - if regexp.MustCompile(`__`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive underscores", k)) - } if regexp.MustCompile(`-$`).MatchString(value) { errors = append(errors, fmt.Errorf( "%q cannot end with a hyphen", k)) @@ -790,7 +787,19 @@ func validateApiGatewayIntegrationContentHandling(v interface{}, k string) (ws [ return } -func validateSQSQueueName(v interface{}, k string) (errors []error) { +func validateSQSQueueName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 80 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) + } + + if !regexp.MustCompile(`^[0-9A-Za-z-_]+(\.fifo)?$`).MatchString(value) { + errors = append(errors, fmt.Errorf("only alphanumeric characters and hyphens allowed in %q", k)) + } + return +} + +func validateSQSNonFifoQueueName(v interface{}, k string) (errors []error) { value := v.(string) if len(value) > 80 { errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) @@ -1878,8 +1887,9 @@ func validateSecurityGroupRuleDescription(v interface{}, k string) (ws []string, "%q cannot be longer than 255 characters: %q", k, value)) } - // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IpRange.html - pattern := `^[A-Za-z0-9 \.\_\-\:\/\(\)\#\,\@\[\]\+\=\;\{\}\!\$\*]+$` + // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IpRange.html. Note that + // "" is an allowable description value. + pattern := `^[A-Za-z0-9 \.\_\-\:\/\(\)\#\,\@\[\]\+\=\;\{\}\!\$\*]*$` if !regexp.MustCompile(pattern).MatchString(value) { errors = append(errors, fmt.Errorf( "%q doesn't comply with restrictions (%q): %q", @@ -2147,30 +2157,6 @@ func validateAwsElastiCacheReplicationGroupAuthToken(v interface{}, k string) (w return } -func validateServiceDiscoveryServiceDnsRecordsType(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - validType := []string{"SRV", "A", "AAAA"} - for _, str := range validType { - if value == str { - return - } - } - errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) - return -} - -func validateServiceDiscoveryServiceHealthCheckConfigType(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - validType := []string{"HTTP", "HTTPS", "TCP"} - for _, str := range validType { - if value == str { - return - } - } - errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) - return -} - func validateGameliftOperatingSystem(v interface{}, k string) (ws []string, errors []error) { value := v.(string) operatingSystems := map[string]bool{ @@ -2271,3 +2257,38 @@ func validateAmazonSideAsn(v interface{}, k string) (ws []string, errors []error } return } + +func validateIotThingTypeName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`[a-zA-Z0-9:_-]+`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters, colons, underscores and hyphens allowed in %q", k)) + } + return +} + +func validateIotThingTypeDescription(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 2028 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 2028 characters", k)) + } + if !regexp.MustCompile(`[\\p{Graph}\\x20]*`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must match pattern [\\p{Graph}\\x20]*", k)) + } + return +} + +func validateIotThingTypeSearchableAttribute(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 128 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 128 characters", k)) + } + if !regexp.MustCompile(`[a-zA-Z0-9_.,@/:#-]+`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters, underscores, dots, commas, arobases, slashes, colons, hashes and hyphens allowed in %q", k)) + } + return +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 56aa4e1e3e35..ee64c09630ba 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -261,762 +261,776 @@ "revisionTime": "2016-01-15T23:47:25Z" }, { - "checksumSHA1": "3U3U5SzawV/N/rjwlntapRlgtWQ=", + "checksumSHA1": "fQFz9TVTFLzLZBBTL/3nXt0PepA=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "9nE/FjZ4pYrT883KtV2/aI+Gayo=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "7/8j/q0TWtOgXyvEcv4B2Dhl00o=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "OnU/n7R33oYXiB4SAGd5pK7I0Bs=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { - "checksumSHA1": "CJNEM69cgdO9tZi6c5Lj07jI+dk=", + "checksumSHA1": "LRonWcnvI95HVKs5fLa+wBU9A+E=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "657ICMok3uC5dm5e9bKcVF2HaxE=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "DIn7B+oP++/nw603OB95fmupzu8=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "iU00ZjhAml/13g+1YXT21IqoXqg=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "1QmQ3FqV37w0Zi44qv8pA1GeR0A=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "Ih4il2OyFyaSuoMv6hhvPUN8Gn4=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "DPl/OkvEUjrd+XKqX73l6nUNw3U=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "edPLU/Lb9QzcB2tFBgkKvF/WdY8=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" + }, + { + "checksumSHA1": "eXdYovPaIY64heZE1nczTsNRvtw=", + "path": "github.com/aws/aws-sdk-go/service/appsync", + "revision": "ebef4262e06a772a06a80aaee8e952c2514e1606", + "revisionTime": "2018-02-23T18:40:12Z" }, { "checksumSHA1": "wrOVdI/6ZTZ/H0Kxjh3bBEZtVzk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "q4j8cW2zBulU/xx16A8/NxexXKE=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "P5gDOoqIdVjMU77e5Nhy48QLpS4=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "EoaTzMilW+OIi5eETJUpd+giyTc=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "e42d74a2cc63cbef14cc85399ad04181da129ded", - "revisionTime": "2018-02-12T21:54:04Z" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "yuFNzmUIWppfji/Xx6Aao0EE4cY=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "0nPnGWlegQG7bn/iIIfjJFoljyU=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "VTc9UOMqIwuhWJ6oGQDsMkTW09I=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "ItXljM1vG/0goVleodRgbfYgyxQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "5lmoDceAWT0vrUTf3wKAaZRXwbg=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "HHct8eQygkIJ+vrQpKhB0IEDymQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "22txzj8ItH1+lzyyLlFz/vtRV2I=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "RRQCgy4s3k6CJQae3ueLepkK4PI=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "wvXGTyWPjtgC4OjXb80IxYdpqmE=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "V1Y05qfjN4xOCy+GnPWSCqIeZb4=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "Ju8efcqcIgggB7N8io/as9ERVdc=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { - "checksumSHA1": "Q4nvxp3mwkpNITKAPWGk5uFjLl8=", + "checksumSHA1": "jeCyZm4iJmOLbVOe/70QNkII+qU=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "kt8wGmAKAo+iC1dR/g9iJn46nDo=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "45sgs1urdRiXDb35iuAhQPzl0e4=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" + }, + { + "checksumSHA1": "bu1R1eKCK2fc5+hMcXmagr3iIik=", + "path": "github.com/aws/aws-sdk-go/service/dax", + "revision": "ebef4262e06a772a06a80aaee8e952c2514e1606", + "revisionTime": "2018-02-23T18:40:12Z" }, { "checksumSHA1": "EaEfUc3nt1sS/cdfSYGq+JtSVKs=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "LRdh5oXUe2yURIk5FDH6ceEZGMo=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "a7itHIwtyXtOGQ0KsiefmsHgu4s=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "8JiVrxMjFSdBOfVWCy1QU+JzB08=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { - "checksumSHA1": "Sj6NTKuc/6+amv4RsMqrZkvkvpc=", + "checksumSHA1": "Wt2FgZmez84iZmcDjR2pof13dTQ=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "kEgV0dSAj3M3M1waEkC27JS7VnU=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "WeevJuELH3BFpUQJC4cqZODz4c0=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "4XmkiujbDA68x39KGgURR1+uPiQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "o73xT1zFo3C+giQwKcRj02OAZhM=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "1U0w3+W7kvH901jSftehitrRHCg=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "VYGtTaSiajfKOVTbi9/SNmbiIac=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "SZ7yLDZ6RvMhpWe0Goyem64kgyA=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "iRI32eUYQfumh0LybzZ+5iWV3jE=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "SvXeFtI3yR9UmamKEYKY/diBWDY=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "5x77vwxya74Qu5YEq75/lhyYkqY=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "t7BmfpJqmQ7Y0EYcj/CR9Aup9go=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "iHyMxl+rkonWCTlysoO4ISkumCA=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "oDoGvSfmO2Z099ixV2HXn+SDeHE=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "M01rYrldc6zwbpAeaLX5UJ6b25g=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { - "checksumSHA1": "L+3qjFRMMQHkpY+Wg4PAtaN/lrg=", + "checksumSHA1": "VRaMYP1928z+aLVk2qX5OPFaobk=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "I8CWKTI9BLrIF9ZKf6SpWhG+LXM=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "45gdBZuM7PWLQzWuBasytvZZpK0=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "pZwCI4DpP5hcMa/ItKhiwo/ukd0=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "DfzNze8B3ME2tV3TtXP7eQXUjD0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { - "checksumSHA1": "P132J6pP1Z5ddG/8UqeuQFmeei4=", + "checksumSHA1": "Vqq049R2eveVD15emT9vKTyBsIg=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "lAgaKbwpyflY7+t4V3EeH18RwgA=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "4yGrGQatXcr8eGRWUoBg3KqAHK8=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "kEZmPI9Y9+05SWuRCdtt+QkqwLI=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "3QV+ZVkQ8g8JkNkftwHaOCevyqM=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "QuOSKqV8nFvvzN4wcsToltMFI1Y=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { - "checksumSHA1": "9AwJ02ip5HmAz2PtMTOGHX0U984=", + "checksumSHA1": "LI+fV4xrVf/bHYHt3nCb3rhc7+c=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "Pj9IgrR635tqA0YamoSC1GaHeao=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "EaDeOWEVUQ21y3cFDyDuZPaK470=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "fXQn3V0ZRBZpTXUEHl4/yOjR4mQ=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "rtKbVK1uZVIdkTR7yJIhAte97XQ=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "erg+1BSdtfOk1KFXmnJ2bFHJpBY=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "8LeTeLzNs+0vNxTeOjMCtSrSwqo=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "u3AMeFxtHGtiJCxDeIm4dAwzBIc=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "B3CgAFSREebpsFoFOo4vrQ6u04w=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "9Qj8yLl67q9uxBUCc0PT20YiP1M=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "XmEJe50M8MddNEkwbZoC+YvRjgg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "jl3IYnqe0OFL2bemYhF5tLOwvvs=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "x7HCNPJnQi+4P6FKpBTY1hm3m6o=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "ZKwkpd+UVwEKTOMhsbNpfXGUIvI=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "Uk2A+lTH7aAlQlkj7WIm2RFZV8A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "de28909e9837364f0368d94ddcba085c57af3c12", - "revisionTime": "2018-02-08T20:25:49Z", - "version": "v1.12.73", - "versionExact": "v1.12.73" + "revision": "ebc8a649dc2a7c78c9237c2575a63b3efd6d0a2d", + "revisionTime": "2018-02-12T21:53:52Z", + "version": "v1.12.75", + "versionExact": "v1.12.75" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", @@ -2146,20 +2160,20 @@ "revisionTime": "2018-01-15T19:27:20Z" }, { - "checksumSHA1": "5XyfTtyMIFp/q/Xz3y0LgbhCnfQ=", + "checksumSHA1": "TZcEg85gFLvAxihpYP99r6espQE=", "path": "github.com/terraform-providers/terraform-provider-aws", - "revision": "5293a0e3b1366ee16d8742b9b2354781a79bfbd9", - "revisionTime": "2018-02-09T20:49:46Z", - "version": "v1.9.0", - "versionExact": "v1.9.0" + "revision": "684291f45b87da88f39a8b4050ebc1c5e6c2f6e0", + "revisionTime": "2018-02-24T22:47:55Z", + "version": "v1.10.0", + "versionExact": "v1.10.0" }, { - "checksumSHA1": "YM2nvPlpKTnSeZ0bdpMdVgpy/XU=", + "checksumSHA1": "jBr0FKeswC9xVg758hOtM/Mb1fA=", "path": "github.com/terraform-providers/terraform-provider-aws/aws", - "revision": "5293a0e3b1366ee16d8742b9b2354781a79bfbd9", - "revisionTime": "2018-02-09T20:49:46Z", - "version": "v1.9.0", - "versionExact": "v1.9.0" + "revision": "684291f45b87da88f39a8b4050ebc1c5e6c2f6e0", + "revisionTime": "2018-02-24T22:47:55Z", + "version": "v1.10.0", + "versionExact": "v1.10.0" }, { "checksumSHA1": "7WDq0VsOJmABPUCEvfuerEp7mBg=",