Merge pull request #17216 from hashicorp/f-aws-cn-northwest-1

deps: Bump AWS provider to support cn-northwest-1 state
This commit is contained in:
Brian Flad 2018-02-06 18:01:42 -05:00 committed by GitHub
commit ec25a320e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 23326 additions and 1868 deletions

View File

@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"io"
"os"
"github.com/aws/aws-sdk-go/aws/awserr"
)
@ -84,11 +85,34 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol
custAddEC2Metadata(p)
custAddS3DualStack(p)
custRmIotDataService(p)
custFixCloudHSMv2SigningName(p)
}
return ps, nil
}
func custFixCloudHSMv2SigningName(p *partition) {
// Workaround for aws/aws-sdk-go#1745 until the endpoint model can be
// fixed upstream. TODO remove this once the endpoints model is updated.
s, ok := p.Services["cloudhsmv2"]
if !ok {
return
}
if len(s.Defaults.CredentialScope.Service) != 0 {
fmt.Fprintf(os.Stderr, "cloudhsmv2 signing name already set, ignoring override.\n")
// If the value is already set don't override
return
}
s.Defaults.CredentialScope.Service = "cloudhsm"
fmt.Fprintf(os.Stderr, "cloudhsmv2 signing name not set, overriding.\n")
p.Services["cloudhsmv2"] = s
}
func custAddS3DualStack(p *partition) {
if p.ID != "aws" {
return

View File

@ -52,6 +52,7 @@ const (
Appstream2ServiceID = "appstream2" // Appstream2.
AthenaServiceID = "athena" // Athena.
AutoscalingServiceID = "autoscaling" // Autoscaling.
AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans.
BatchServiceID = "batch" // Batch.
BudgetsServiceID = "budgets" // Budgets.
ClouddirectoryServiceID = "clouddirectory" // Clouddirectory.
@ -370,6 +371,22 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
"autoscaling-plans": service{
Defaults: endpoint{
Hostname: "autoscaling.{region}.amazonaws.com",
Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "autoscaling-plans",
},
},
Endpoints: endpoints{
"ap-southeast-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
},
},
"batch": service{
Endpoints: endpoints{
@ -459,7 +476,11 @@ var awsPartition = partition{
},
},
"cloudhsmv2": service{
Defaults: endpoint{
CredentialScope: credentialScope{
Service: "cloudhsm",
},
},
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-south-1": endpoint{},
@ -740,6 +761,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@ -1043,10 +1065,13 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@ -1093,10 +1118,11 @@ var awsPartition = partition{
"glue": service{
Endpoints: endpoints{
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
"ap-northeast-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
},
},
"greengrass": service{
@ -1489,6 +1515,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
},
},
@ -1636,6 +1663,7 @@ var awsPartition = partition{
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-3": endpoint{},
@ -2423,6 +2451,12 @@ var awsusgovPartition = partition{
},
},
},
"ecs": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
"elasticache": service{
Endpoints: endpoints{

View File

@ -142,13 +142,28 @@ func (r *Request) nextPageTokens() []interface{} {
tokens := []interface{}{}
tokenAdded := false
for _, outToken := range r.Operation.OutputTokens {
v, _ := awsutil.ValuesAtPath(r.Data, outToken)
if len(v) > 0 {
tokens = append(tokens, v[0])
tokenAdded = true
} else {
vs, _ := awsutil.ValuesAtPath(r.Data, outToken)
if len(vs) == 0 {
tokens = append(tokens, nil)
continue
}
v := vs[0]
switch tv := v.(type) {
case *string:
if len(aws.StringValue(tv)) == 0 {
tokens = append(tokens, nil)
continue
}
case string:
if len(tv) == 0 {
tokens = append(tokens, nil)
continue
}
}
tokenAdded = true
tokens = append(tokens, v)
}
if !tokenAdded {
return nil

View File

@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
const SDKVersion = "1.12.59"
const SDKVersion = "1.12.70"

View File

@ -76,12 +76,11 @@ func (c *ApplicationAutoScaling) DeleteScalingPolicyRequest(input *DeleteScaling
// for the API request.
//
// * ErrCodeObjectNotFoundException "ObjectNotFoundException"
// The specified object could not be found. For any Put or Register API operation,
// which depends on the existence of a scalable target, this exception is thrown
// if the scalable target with the specified service namespace, resource ID,
// and scalable dimension does not exist. For any Delete or Deregister API operation,
// this exception is thrown if the resource that is to be deleted or deregistered
// cannot be found.
// The specified object could not be found. For any operation that depends on
// the existence of a scalable target, this exception is thrown if the scalable
// target with the specified service namespace, resource ID, and scalable dimension
// does not exist. For any operation that deletes or deregisters a resource,
// this exception is thrown if the resource cannot be found.
//
// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
// Concurrent updates caused an exception, for example, if you request an update
@ -171,12 +170,11 @@ func (c *ApplicationAutoScaling) DeleteScheduledActionRequest(input *DeleteSched
// for the API request.
//
// * ErrCodeObjectNotFoundException "ObjectNotFoundException"
// The specified object could not be found. For any Put or Register API operation,
// which depends on the existence of a scalable target, this exception is thrown
// if the scalable target with the specified service namespace, resource ID,
// and scalable dimension does not exist. For any Delete or Deregister API operation,
// this exception is thrown if the resource that is to be deleted or deregistered
// cannot be found.
// The specified object could not be found. For any operation that depends on
// the existence of a scalable target, this exception is thrown if the scalable
// target with the specified service namespace, resource ID, and scalable dimension
// does not exist. For any operation that deletes or deregisters a resource,
// this exception is thrown if the resource cannot be found.
//
// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
// Concurrent updates caused an exception, for example, if you request an update
@ -271,12 +269,11 @@ func (c *ApplicationAutoScaling) DeregisterScalableTargetRequest(input *Deregist
// for the API request.
//
// * ErrCodeObjectNotFoundException "ObjectNotFoundException"
// The specified object could not be found. For any Put or Register API operation,
// which depends on the existence of a scalable target, this exception is thrown
// if the scalable target with the specified service namespace, resource ID,
// and scalable dimension does not exist. For any Delete or Deregister API operation,
// this exception is thrown if the resource that is to be deleted or deregistered
// cannot be found.
// The specified object could not be found. For any operation that depends on
// the existence of a scalable target, this exception is thrown if the scalable
// target with the specified service namespace, resource ID, and scalable dimension
// does not exist. For any operation that deletes or deregisters a resource,
// this exception is thrown if the resource cannot be found.
//
// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
// Concurrent updates caused an exception, for example, if you request an update
@ -357,8 +354,7 @@ func (c *ApplicationAutoScaling) DescribeScalableTargetsRequest(input *DescribeS
// DescribeScalableTargets API operation for Application Auto Scaling.
//
// Provides descriptive information about the scalable targets in the specified
// namespace.
// Gets information about the scalable targets in the specified namespace.
//
// You can filter the results using the ResourceIds and ScalableDimension parameters.
//
@ -690,7 +686,7 @@ func (c *ApplicationAutoScaling) DescribeScalingPoliciesRequest(input *DescribeS
// with a scaling policy due to a client error, for example, if the role ARN
// specified for a scalable target does not have permission to call the CloudWatch
// DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html)
// API operation on behalf of your account.
// on your behalf.
//
// * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
// The next token supplied was invalid.
@ -918,8 +914,8 @@ func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicy
//
// Each scalable target is identified by a service namespace, resource ID, and
// scalable dimension. A scaling policy applies to the scalable target identified
// by those three attributes. You cannot create a scaling policy without first
// registering a scalable target using RegisterScalableTarget.
// by those three attributes. You cannot create a scaling policy until you register
// the scalable target using RegisterScalableTarget.
//
// To update a policy, specify its policy name and the parameters that you want
// to change. Any parameters that you don't specify are not changed by this
@ -941,17 +937,15 @@ func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicy
// for the API request.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Your account exceeded a limit. This exception is thrown when a per-account
// resource limit is exceeded. For more information, see Application Auto Scaling
// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_as-app).
// A per-account resource limit is exceeded. For more information, see Application
// Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
//
// * ErrCodeObjectNotFoundException "ObjectNotFoundException"
// The specified object could not be found. For any Put or Register API operation,
// which depends on the existence of a scalable target, this exception is thrown
// if the scalable target with the specified service namespace, resource ID,
// and scalable dimension does not exist. For any Delete or Deregister API operation,
// this exception is thrown if the resource that is to be deleted or deregistered
// cannot be found.
// The specified object could not be found. For any operation that depends on
// the existence of a scalable target, this exception is thrown if the scalable
// target with the specified service namespace, resource ID, and scalable dimension
// does not exist. For any operation that deletes or deregisters a resource,
// this exception is thrown if the resource cannot be found.
//
// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
// Concurrent updates caused an exception, for example, if you request an update
@ -963,7 +957,7 @@ func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicy
// with a scaling policy due to a client error, for example, if the role ARN
// specified for a scalable target does not have permission to call the CloudWatch
// DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html)
// API operation on behalf of your account.
// on your behalf.
//
// * ErrCodeInternalServiceException "InternalServiceException"
// The service encountered an internal error.
@ -1039,8 +1033,8 @@ func (c *ApplicationAutoScaling) PutScheduledActionRequest(input *PutScheduledAc
//
// Each scalable target is identified by a service namespace, resource ID, and
// scalable dimension. A scheduled action applies to the scalable target identified
// by those three attributes. You cannot create a scheduled action without first
// registering a scalable target using RegisterScalableTarget.
// by those three attributes. You cannot create a scheduled action until you
// register the scalable target using RegisterScalableTarget.
//
// To update an action, specify its name and the parameters that you want to
// change. If you don't specify start and end times, the old values are deleted.
@ -1063,17 +1057,15 @@ func (c *ApplicationAutoScaling) PutScheduledActionRequest(input *PutScheduledAc
// for the API request.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Your account exceeded a limit. This exception is thrown when a per-account
// resource limit is exceeded. For more information, see Application Auto Scaling
// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_as-app).
// A per-account resource limit is exceeded. For more information, see Application
// Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
//
// * ErrCodeObjectNotFoundException "ObjectNotFoundException"
// The specified object could not be found. For any Put or Register API operation,
// which depends on the existence of a scalable target, this exception is thrown
// if the scalable target with the specified service namespace, resource ID,
// and scalable dimension does not exist. For any Delete or Deregister API operation,
// this exception is thrown if the resource that is to be deleted or deregistered
// cannot be found.
// The specified object could not be found. For any operation that depends on
// the existence of a scalable target, this exception is thrown if the scalable
// target with the specified service namespace, resource ID, and scalable dimension
// does not exist. For any operation that deletes or deregisters a resource,
// this exception is thrown if the resource cannot be found.
//
// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
// Concurrent updates caused an exception, for example, if you request an update
@ -1151,12 +1143,12 @@ func (c *ApplicationAutoScaling) RegisterScalableTargetRequest(input *RegisterSc
// Registers or updates a scalable target. A scalable target is a resource that
// Application Auto Scaling can scale out or scale in. After you have registered
// a scalable target, you can use this operation to update the minimum and maximum
// values for your scalable dimension.
// values for its scalable dimension.
//
// After you register a scalable target, you can create and apply scaling policies
// using PutScalingPolicy. You can view the scaling policies for a service namespace
// using DescribeScalableTargets. If you are no longer using a scalable target,
// you can deregister it using DeregisterScalableTarget.
// using DescribeScalableTargets. If you no longer need a scalable target, you
// can deregister it using DeregisterScalableTarget.
//
// 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
@ -1171,9 +1163,8 @@ func (c *ApplicationAutoScaling) RegisterScalableTargetRequest(input *RegisterSc
// for the API request.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// Your account exceeded a limit. This exception is thrown when a per-account
// resource limit is exceeded. For more information, see Application Auto Scaling
// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_as-app).
// A per-account resource limit is exceeded. For more information, see Application
// Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
//
// * ErrCodeConcurrentUpdateException "ConcurrentUpdateException"
// Concurrent updates caused an exception, for example, if you request an update
@ -1779,8 +1770,8 @@ func (s DeregisterScalableTargetOutput) GoString() string {
type DescribeScalableTargetsInput struct {
_ struct{} `type:"structure"`
// The maximum number of scalable target results. This value can be between
// 1 and 50. The default value is 50.
// The maximum number of scalable targets. This value can be between 1 and 50.
// The default value is 50.
//
// If this parameter is used, the operation returns up to MaxResults results
// at a time, along with a NextToken value. To get the next set of results,
@ -1917,7 +1908,7 @@ type DescribeScalableTargetsOutput struct {
// there are no more results to return.
NextToken *string `type:"string"`
// The list of scalable targets that matches the request parameters.
// The scalable targets that match the request parameters.
ScalableTargets []*ScalableTarget `type:"list"`
}
@ -1947,8 +1938,8 @@ func (s *DescribeScalableTargetsOutput) SetScalableTargets(v []*ScalableTarget)
type DescribeScalingActivitiesInput struct {
_ struct{} `type:"structure"`
// The maximum number of scalable target results. This value can be between
// 1 and 50. The default value is 50.
// The maximum number of scalable targets. This value can be between 1 and 50.
// The default value is 50.
//
// If this parameter is used, the operation returns up to MaxResults results
// at a time, along with a NextToken value. To get the next set of results,
@ -2118,8 +2109,8 @@ func (s *DescribeScalingActivitiesOutput) SetScalingActivities(v []*ScalingActiv
type DescribeScalingPoliciesInput struct {
_ struct{} `type:"structure"`
// The maximum number of scalable target results. This value can be between
// 1 and 50. The default value is 50.
// The maximum number of scalable targets. This value can be between 1 and 50.
// The default value is 50.
//
// If this parameter is used, the operation returns up to MaxResults results
// at a time, along with a NextToken value. To get the next set of results,
@ -2534,14 +2525,14 @@ type PredefinedMetricSpecification struct {
_ struct{} `type:"structure"`
// The metric type. The ALBRequestCountPerTarget metric type applies only to
// Spot fleet requests.
// Spot fleet requests and ECS services.
//
// PredefinedMetricType is a required field
PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"`
// Identifies the resource associated with the metric type. You can't specify
// a resource label unless the metric type is ALBRequestCountPerTarget and there
// is a target group attached to the Spot fleet request.
// is a target group attached to the Spot fleet request or ECS service.
//
// The format is app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
// where:
@ -2601,11 +2592,11 @@ type PutScalingPolicyInput struct {
// PolicyName is a required field
PolicyName *string `min:"1" type:"string" required:"true"`
// The policy type. If you are creating a new policy, this parameter is required.
// If you are updating a policy, this parameter is not required.
// The policy type. This parameter is required if you are creating a policy.
//
// For DynamoDB, only TargetTrackingScaling is supported. For any other service,
// only StepScaling is supported.
// For DynamoDB, only TargetTrackingScaling is supported. For Amazon ECS, Spot
// Fleet, and Amazon RDS, both StepScaling and TargetTrackingScaling are supported.
// For any other service, only StepScaling is supported.
PolicyType *string `type:"string" enum:"PolicyType"`
// The identifier of the resource associated with the scaling policy. This string
@ -2682,8 +2673,8 @@ type PutScalingPolicyInput struct {
// A target tracking policy.
//
// This parameter is required if you are creating a new policy and the policy
// type is TargetTrackingScaling.
// This parameter is required if you are creating a policy and the policy type
// is TargetTrackingScaling.
TargetTrackingScalingPolicyConfiguration *TargetTrackingScalingPolicyConfiguration `type:"structure"`
}
@ -2846,7 +2837,8 @@ type PutScheduledActionInput struct {
// ResourceId is a required field
ResourceId *string `min:"1" type:"string" required:"true"`
// The scalable dimension. This string consists of the service namespace, resource
// The scalable dimension. This parameter is required if you are creating a
// scheduled action. This string consists of the service namespace, resource
// type, and scaling property.
//
// * ecs:service:DesiredCount - The desired task count of an ECS service.
@ -3021,13 +3013,11 @@ type RegisterScalableTargetInput struct {
_ struct{} `type:"structure"`
// The maximum value to scale to in response to a scale out event. This parameter
// is required if you are registering a scalable target and optional if you
// are updating one.
// is required if you are registering a scalable target.
MaxCapacity *int64 `type:"integer"`
// The minimum value to scale to in response to a scale in event. This parameter
// is required if you are registering a scalable target and optional if you
// are updating one.
// is required if you are registering a scalable target.
MinCapacity *int64 `type:"integer"`
// The identifier of the resource associated with the scalable target. This
@ -3057,16 +3047,13 @@ type RegisterScalableTargetInput struct {
// ResourceId is a required field
ResourceId *string `min:"1" type:"string" required:"true"`
// The ARN of an IAM role that allows Application Auto Scaling to modify the
// scalable target on your behalf.
//
// With Amazon RDS resources, permissions are granted using a service-linked
// role. For more information, see Service-Linked Roles for Application Auto
// Scaling (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/application-autoscaling-service-linked-roles.html).
// Application Auto Scaling creates a service-linked role that grants it permissions
// to modify the scalable target on your behalf. For more information, see Service-Linked
// Roles for Application Auto Scaling (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/application-autoscaling-service-linked-roles.html).
//
// For resources that are not supported using a service-linked role, this parameter
// is required when you register a scalable target and optional when you update
// one.
// is required and must specify the ARN of an IAM role that allows Application
// Auto Scaling to modify the scalable target on your behalf.
RoleARN *string `min:"1" type:"string"`
// The scalable dimension associated with the scalable target. This string consists
@ -4293,6 +4280,12 @@ const (
// MetricTypeEc2spotFleetRequestAverageNetworkOut is a MetricType enum value
MetricTypeEc2spotFleetRequestAverageNetworkOut = "EC2SpotFleetRequestAverageNetworkOut"
// MetricTypeEcsserviceAverageCpuutilization is a MetricType enum value
MetricTypeEcsserviceAverageCpuutilization = "ECSServiceAverageCPUUtilization"
// MetricTypeEcsserviceAverageMemoryUtilization is a MetricType enum value
MetricTypeEcsserviceAverageMemoryUtilization = "ECSServiceAverageMemoryUtilization"
)
const (

View File

@ -11,13 +11,15 @@
//
// * Scale your resources in response to CloudWatch alarms
//
// * Schedule one-time or recurring scaling actions
//
// * View the history of your scaling events
//
// Application Auto Scaling can scale the following AWS resources:
//
// * Amazon ECS services. For more information, see Service Auto Scaling
// (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html)
// in the Amazon EC2 Container Service Developer Guide.
// in the Amazon Elastic Container Service Developer Guide.
//
// * Amazon EC2 Spot fleets. For more information, see Automatic Scaling
// for Spot Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/fleet-auto-scaling.html)
@ -36,8 +38,8 @@
// Automatically with DynamoDB Auto Scaling (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html)
// in the Amazon DynamoDB Developer Guide.
//
// * Amazon Aurora Replicas. For more information, see Using Application
// Auto Scaling with an Amazon Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Integrating.AutoScaling.html).
// * Amazon Aurora Replicas. For more information, see Using Amazon Aurora
// Auto Scaling with Aurora Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Integrating.AutoScaling.html).
//
// For a list of supported regions, see AWS Regions and Endpoints: Application
// Auto Scaling (http://docs.aws.amazon.com/general/latest/gr/rande.html#as-app_region)

View File

@ -19,7 +19,7 @@ const (
// with a scaling policy due to a client error, for example, if the role ARN
// specified for a scalable target does not have permission to call the CloudWatch
// DescribeAlarms (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html)
// API operation on behalf of your account.
// on your behalf.
ErrCodeFailedResourceAccessException = "FailedResourceAccessException"
// ErrCodeInternalServiceException for service response error code
@ -37,20 +37,18 @@ const (
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// Your account exceeded a limit. This exception is thrown when a per-account
// resource limit is exceeded. For more information, see Application Auto Scaling
// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_as-app).
// A per-account resource limit is exceeded. For more information, see Application
// Auto Scaling Limits (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeObjectNotFoundException for service response error code
// "ObjectNotFoundException".
//
// The specified object could not be found. For any Put or Register API operation,
// which depends on the existence of a scalable target, this exception is thrown
// if the scalable target with the specified service namespace, resource ID,
// and scalable dimension does not exist. For any Delete or Deregister API operation,
// this exception is thrown if the resource that is to be deleted or deregistered
// cannot be found.
// The specified object could not be found. For any operation that depends on
// the existence of a scalable target, this exception is thrown if the scalable
// target with the specified service namespace, resource ID, and scalable dimension
// does not exist. For any operation that deletes or deregisters a resource,
// this exception is thrown if the resource cannot be found.
ErrCodeObjectNotFoundException = "ObjectNotFoundException"
// ErrCodeValidationException for service response error code

View File

@ -388,7 +388,7 @@ func (c *CodeBuild) CreateWebhookRequest(input *CreateWebhookInput) (req *reques
// AWS CodePipeline. Because billing is on a per-build basis, you will be billed
// for both builds. Therefore, if you are using AWS CodePipeline, we recommend
// that you disable webhooks in CodeBuild. In the AWS CodeBuild console, clear
// the Webhook box. For more information, see step 9 in Change a Build Projects
// the Webhook box. For more information, see step 9 in Change a Build Project's
// Settings (http://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@ -3430,6 +3430,9 @@ func (s *ProjectCache) SetType(v string) *ProjectCache {
type ProjectEnvironment struct {
_ struct{} `type:"structure"`
// The certificate to use with this build project.
Certificate *string `locationName:"certificate" type:"string"`
// Information about the compute resources the build project will use. Available
// values include:
//
@ -3516,6 +3519,12 @@ func (s *ProjectEnvironment) Validate() error {
return nil
}
// SetCertificate sets the Certificate field's value.
func (s *ProjectEnvironment) SetCertificate(v string) *ProjectEnvironment {
s.Certificate = &v
return s
}
// SetComputeType sets the ComputeType field's value.
func (s *ProjectEnvironment) SetComputeType(v string) *ProjectEnvironment {
s.ComputeType = &v
@ -3565,6 +3574,13 @@ type ProjectSource struct {
// the source code to be built.
Buildspec *string `locationName:"buildspec" type:"string"`
// Information about the git clone depth for the build project.
GitCloneDepth *int64 `locationName:"gitCloneDepth" type:"integer"`
// Enable this flag to ignore SSL warnings while connecting to the project source
// code.
InsecureSsl *bool `locationName:"insecureSsl" type:"boolean"`
// Information about the location of the source code to be built. Valid values
// include:
//
@ -3665,6 +3681,18 @@ func (s *ProjectSource) SetBuildspec(v string) *ProjectSource {
return s
}
// SetGitCloneDepth sets the GitCloneDepth field's value.
func (s *ProjectSource) SetGitCloneDepth(v int64) *ProjectSource {
s.GitCloneDepth = &v
return s
}
// SetInsecureSsl sets the InsecureSsl field's value.
func (s *ProjectSource) SetInsecureSsl(v bool) *ProjectSource {
s.InsecureSsl = &v
return s
}
// SetLocation sets the Location field's value.
func (s *ProjectSource) SetLocation(v string) *ProjectSource {
s.Location = &v
@ -3748,6 +3776,10 @@ type StartBuildInput struct {
// ones already defined in the build project.
EnvironmentVariablesOverride []*EnvironmentVariable `locationName:"environmentVariablesOverride" type:"list"`
// The user-defined depth of history, with a minimum value of 0, that overrides,
// for this build only, any previous depth of history defined in the build project.
GitCloneDepthOverride *int64 `locationName:"gitCloneDepthOverride" type:"integer"`
// The name of the build project to start running a build.
//
// ProjectName is a required field
@ -3841,6 +3873,12 @@ func (s *StartBuildInput) SetEnvironmentVariablesOverride(v []*EnvironmentVariab
return s
}
// SetGitCloneDepthOverride sets the GitCloneDepthOverride field's value.
func (s *StartBuildInput) SetGitCloneDepthOverride(v int64) *StartBuildInput {
s.GitCloneDepthOverride = &v
return s
}
// SetProjectName sets the ProjectName field's value.
func (s *StartBuildInput) SetProjectName(v string) *StartBuildInput {
s.ProjectName = &v
@ -4288,6 +4326,14 @@ func (s *VpcConfig) SetVpcId(v string) *VpcConfig {
type Webhook struct {
_ struct{} `type:"structure"`
// This is the server endpoint that will receive the webhook payload.
PayloadUrl *string `locationName:"payloadUrl" min:"1" type:"string"`
// Use this secret while creating a webhook in GitHub for Enterprise. The secret
// allows webhook requests sent by GitHub for Enterprise to be authenticated
// by AWS CodeBuild.
Secret *string `locationName:"secret" min:"1" type:"string"`
// The URL to the webhook.
Url *string `locationName:"url" min:"1" type:"string"`
}
@ -4302,6 +4348,18 @@ func (s Webhook) GoString() string {
return s.String()
}
// SetPayloadUrl sets the PayloadUrl field's value.
func (s *Webhook) SetPayloadUrl(v string) *Webhook {
s.PayloadUrl = &v
return s
}
// SetSecret sets the Secret field's value.
func (s *Webhook) SetSecret(v string) *Webhook {
s.Secret = &v
return s
}
// SetUrl sets the Url field's value.
func (s *Webhook) SetUrl(v string) *Webhook {
s.Url = &v
@ -4478,6 +4536,9 @@ const (
// SourceTypeBitbucket is a SourceType enum value
SourceTypeBitbucket = "BITBUCKET"
// SourceTypeGithubEnterprise is a SourceType enum value
SourceTypeGithubEnterprise = "GITHUB_ENTERPRISE"
)
const (

View File

@ -2765,7 +2765,7 @@ func (c *DeviceFarm) ListJobsRequest(input *ListJobsInput) (req *request.Request
// ListJobs API operation for AWS Device Farm.
//
// Gets information about jobs.
// Gets information about jobs for a given test run.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@ -3919,7 +3919,7 @@ func (c *DeviceFarm) ListSuitesRequest(input *ListSuitesInput) (req *request.Req
// ListSuites API operation for AWS Device Farm.
//
// Gets information about suites.
// Gets information about test suites for a given job.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@ -4063,7 +4063,7 @@ func (c *DeviceFarm) ListTestsRequest(input *ListTestsInput) (req *request.Reque
// ListTests API operation for AWS Device Farm.
//
// Gets information about tests.
// Gets information about tests in a given test suite.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@ -5885,7 +5885,7 @@ type CreateRemoteAccessSessionInput struct {
// Unique identifier for the client. If you want access to multiple devices
// on the same client, you should pass the same clientId value in each call
// to CreateRemoteAccessSession. This is required only if remoteDebugEnabled
// is set to true true.
// is set to true.
ClientId *string `locationName:"clientId" type:"string"`
// The configuration information for the remote access session request.
@ -5897,6 +5897,20 @@ type CreateRemoteAccessSessionInput struct {
// DeviceArn is a required field
DeviceArn *string `locationName:"deviceArn" min:"32" type:"string" required:"true"`
// The interaction mode of the remote access session. Valid values are:
//
// * INTERACTIVE: You can interact with the iOS device by viewing, touching,
// and rotating the screen. You cannot run XCUITest framework-based tests
// in this mode.
//
// * NO_VIDEO: You are connected to the device but cannot interact with it
// or view the screen. This mode has the fastest test execution speed. You
// can run XCUITest framework-based tests in this mode.
//
// * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You
// can run XCUITest framework-based tests and watch the screen in this mode.
InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"`
// The name of the remote access session that you wish to create.
Name *string `locationName:"name" type:"string"`
@ -5910,6 +5924,13 @@ type CreateRemoteAccessSessionInput struct {
// remote access session.
RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"`
// The Amazon Resource Name (ARN) for the app to be recorded in the remote access
// session.
RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"`
// Set to true to enable remote recording for the remote access session.
RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"`
// The public key of the ssh key pair you want to use for connecting to remote
// devices in your remote debugging session. This is only required if remoteDebugEnabled
// is set to true.
@ -5941,6 +5962,9 @@ func (s *CreateRemoteAccessSessionInput) Validate() error {
if s.ProjectArn != nil && len(*s.ProjectArn) < 32 {
invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32))
}
if s.RemoteRecordAppArn != nil && len(*s.RemoteRecordAppArn) < 32 {
invalidParams.Add(request.NewErrParamMinLen("RemoteRecordAppArn", 32))
}
if invalidParams.Len() > 0 {
return invalidParams
@ -5966,6 +5990,12 @@ func (s *CreateRemoteAccessSessionInput) SetDeviceArn(v string) *CreateRemoteAcc
return s
}
// SetInteractionMode sets the InteractionMode field's value.
func (s *CreateRemoteAccessSessionInput) SetInteractionMode(v string) *CreateRemoteAccessSessionInput {
s.InteractionMode = &v
return s
}
// SetName sets the Name field's value.
func (s *CreateRemoteAccessSessionInput) SetName(v string) *CreateRemoteAccessSessionInput {
s.Name = &v
@ -5984,6 +6014,18 @@ func (s *CreateRemoteAccessSessionInput) SetRemoteDebugEnabled(v bool) *CreateRe
return s
}
// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value.
func (s *CreateRemoteAccessSessionInput) SetRemoteRecordAppArn(v string) *CreateRemoteAccessSessionInput {
s.RemoteRecordAppArn = &v
return s
}
// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value.
func (s *CreateRemoteAccessSessionInput) SetRemoteRecordEnabled(v bool) *CreateRemoteAccessSessionInput {
s.RemoteRecordEnabled = &v
return s
}
// SetSshPublicKey sets the SshPublicKey field's value.
func (s *CreateRemoteAccessSessionInput) SetSshPublicKey(v string) *CreateRemoteAccessSessionInput {
s.SshPublicKey = &v
@ -6617,6 +6659,9 @@ type Device struct {
// The device's model name.
Model *string `locationName:"model" type:"string"`
// The device's model ID.
ModelId *string `locationName:"modelId" type:"string"`
// The device's display name.
Name *string `locationName:"name" type:"string"`
@ -6721,6 +6766,12 @@ func (s *Device) SetModel(v string) *Device {
return s
}
// SetModelId sets the ModelId field's value.
func (s *Device) SetModelId(v string) *Device {
s.ModelId = &v
return s
}
// SetName sets the Name field's value.
func (s *Device) SetName(v string) *Device {
s.Name = &v
@ -8562,7 +8613,7 @@ func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput {
type ListJobsInput struct {
_ struct{} `type:"structure"`
// The jobs' ARNs.
// The run's Amazon Resource Name (ARN).
//
// Arn is a required field
Arn *string `locationName:"arn" min:"32" type:"string" required:"true"`
@ -9344,7 +9395,7 @@ func (s *ListSamplesOutput) SetSamples(v []*Sample) *ListSamplesOutput {
type ListSuitesInput struct {
_ struct{} `type:"structure"`
// The suites' ARNs.
// The job's Amazon Resource Name (ARN).
//
// Arn is a required field
Arn *string `locationName:"arn" min:"32" type:"string" required:"true"`
@ -9436,7 +9487,7 @@ func (s *ListSuitesOutput) SetSuites(v []*Suite) *ListSuitesOutput {
type ListTestsInput struct {
_ struct{} `type:"structure"`
// The tests' ARNs.
// The test suite's Amazon Resource Name (ARN).
//
// Arn is a required field
Arn *string `locationName:"arn" min:"32" type:"string" required:"true"`
@ -10543,6 +10594,20 @@ type RemoteAccessSession struct {
// Only returned if remote debugging is enabled for the remote access session.
HostAddress *string `locationName:"hostAddress" type:"string"`
// The interaction mode of the remote access session. Valid values are:
//
// * INTERACTIVE: You can interact with the iOS device by viewing, touching,
// and rotating the screen. You cannot run XCUITest framework-based tests
// in this mode.
//
// * NO_VIDEO: You are connected to the device but cannot interact with it
// or view the screen. This mode has the fastest test execution speed. You
// can run XCUITest framework-based tests in this mode.
//
// * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You
// can run XCUITest framework-based tests and watch the screen in this mode.
InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"`
// A message about the remote access session.
Message *string `locationName:"message" type:"string"`
@ -10553,6 +10618,14 @@ type RemoteAccessSession struct {
// session.
RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"`
// The Amazon Resource Name (ARN) for the app to be recorded in the remote access
// session.
RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"`
// This flag is set to true if remote recording is enabled for the remote access
// session.
RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"`
// The result of the remote access session. Can be any of the following:
//
// * PENDING: A pending condition.
@ -10662,6 +10735,12 @@ func (s *RemoteAccessSession) SetHostAddress(v string) *RemoteAccessSession {
return s
}
// SetInteractionMode sets the InteractionMode field's value.
func (s *RemoteAccessSession) SetInteractionMode(v string) *RemoteAccessSession {
s.InteractionMode = &v
return s
}
// SetMessage sets the Message field's value.
func (s *RemoteAccessSession) SetMessage(v string) *RemoteAccessSession {
s.Message = &v
@ -10680,6 +10759,18 @@ func (s *RemoteAccessSession) SetRemoteDebugEnabled(v bool) *RemoteAccessSession
return s
}
// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value.
func (s *RemoteAccessSession) SetRemoteRecordAppArn(v string) *RemoteAccessSession {
s.RemoteRecordAppArn = &v
return s
}
// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value.
func (s *RemoteAccessSession) SetRemoteRecordEnabled(v bool) *RemoteAccessSession {
s.RemoteRecordEnabled = &v
return s
}
// SetResult sets the Result field's value.
func (s *RemoteAccessSession) SetResult(v string) *RemoteAccessSession {
s.Result = &v
@ -10886,6 +10977,9 @@ func (s *Rule) SetValue(v string) *Rule {
type Run struct {
_ struct{} `type:"structure"`
// An app to upload or that has been uploaded.
AppUpload *string `locationName:"appUpload" min:"32" type:"string"`
// The run's ARN.
Arn *string `locationName:"arn" min:"32" type:"string"`
@ -10908,6 +11002,22 @@ type Run struct {
// Represents the total (metered or unmetered) minutes used by the test run.
DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"`
// The ARN of the device pool for the run.
DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"`
// For fuzz tests, this is the number of events, between 1 and 10000, that the
// UI fuzz test should perform.
EventCount *int64 `locationName:"eventCount" type:"integer"`
// The number of minutes the job will execute before it times out.
JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"`
// Information about the locale that is used for the run.
Locale *string `locationName:"locale" type:"string"`
// Information about the location that is used for the run.
Location *Location `locationName:"location" type:"structure"`
// A message about the run's result.
Message *string `locationName:"message" type:"string"`
@ -10931,6 +11041,9 @@ type Run struct {
// * IOS: The iOS platform.
Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"`
// Information about the radio states for the run.
Radios *Radios `locationName:"radios" type:"structure"`
// The run's result.
//
// Allowed values include:
@ -10954,6 +11067,10 @@ type Run struct {
// if the result is skipped because of test package parsing failure.
ResultCode *string `locationName:"resultCode" type:"string" enum:"ExecutionResultCode"`
// For fuzz tests, this is a seed to use for randomizing the UI fuzz test. Using
// the same seed value between tests ensures identical event sequences.
Seed *int64 `locationName:"seed" type:"integer"`
// The run's start time.
Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"`
@ -11020,6 +11137,10 @@ type Run struct {
//
// * XCTEST_UI: The XCode UI test type.
Type *string `locationName:"type" type:"string" enum:"TestType"`
// A pre-signed Amazon S3 URL that can be used with a corresponding GET request
// to download the symbol file for the run.
WebUrl *string `locationName:"webUrl" type:"string"`
}
// String returns the string representation
@ -11032,6 +11153,12 @@ func (s Run) GoString() string {
return s.String()
}
// SetAppUpload sets the AppUpload field's value.
func (s *Run) SetAppUpload(v string) *Run {
s.AppUpload = &v
return s
}
// SetArn sets the Arn field's value.
func (s *Run) SetArn(v string) *Run {
s.Arn = &v
@ -11074,6 +11201,36 @@ func (s *Run) SetDeviceMinutes(v *DeviceMinutes) *Run {
return s
}
// SetDevicePoolArn sets the DevicePoolArn field's value.
func (s *Run) SetDevicePoolArn(v string) *Run {
s.DevicePoolArn = &v
return s
}
// SetEventCount sets the EventCount field's value.
func (s *Run) SetEventCount(v int64) *Run {
s.EventCount = &v
return s
}
// SetJobTimeoutMinutes sets the JobTimeoutMinutes field's value.
func (s *Run) SetJobTimeoutMinutes(v int64) *Run {
s.JobTimeoutMinutes = &v
return s
}
// SetLocale sets the Locale field's value.
func (s *Run) SetLocale(v string) *Run {
s.Locale = &v
return s
}
// SetLocation sets the Location field's value.
func (s *Run) SetLocation(v *Location) *Run {
s.Location = v
return s
}
// SetMessage sets the Message field's value.
func (s *Run) SetMessage(v string) *Run {
s.Message = &v
@ -11104,6 +11261,12 @@ func (s *Run) SetPlatform(v string) *Run {
return s
}
// SetRadios sets the Radios field's value.
func (s *Run) SetRadios(v *Radios) *Run {
s.Radios = v
return s
}
// SetResult sets the Result field's value.
func (s *Run) SetResult(v string) *Run {
s.Result = &v
@ -11116,6 +11279,12 @@ func (s *Run) SetResultCode(v string) *Run {
return s
}
// SetSeed sets the Seed field's value.
func (s *Run) SetSeed(v int64) *Run {
s.Seed = &v
return s
}
// SetStarted sets the Started field's value.
func (s *Run) SetStarted(v time.Time) *Run {
s.Started = &v
@ -11146,6 +11315,12 @@ func (s *Run) SetType(v string) *Run {
return s
}
// SetWebUrl sets the WebUrl field's value.
func (s *Run) SetWebUrl(v string) *Run {
s.WebUrl = &v
return s
}
// Represents a sample of performance data.
// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/Sample
type Sample struct {
@ -12342,8 +12517,8 @@ func (s *UpdateDevicePoolOutput) SetDevicePool(v *DevicePool) *UpdateDevicePoolO
type UpdateNetworkProfileInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the project that you wish to update network
// profile settings.
// The Amazon Resource Name (ARN) of the project for which you want to update
// network profile settings.
//
// Arn is a required field
Arn *string `locationName:"arn" min:"32" type:"string" required:"true"`
@ -12954,6 +13129,17 @@ const (
ExecutionStatusStopping = "STOPPING"
)
const (
// InteractionModeInteractive is a InteractionMode enum value
InteractionModeInteractive = "INTERACTIVE"
// InteractionModeNoVideo is a InteractionMode enum value
InteractionModeNoVideo = "NO_VIDEO"
// InteractionModeVideoOnly is a InteractionMode enum value
InteractionModeVideoOnly = "VIDEO_ONLY"
)
const (
// NetworkProfileTypeCurated is a NetworkProfileType enum value
NetworkProfileTypeCurated = "CURATED"
@ -13063,6 +13249,9 @@ const (
// TestTypeBuiltinExplorer is a TestType enum value
TestTypeBuiltinExplorer = "BUILTIN_EXPLORER"
// TestTypeWebPerformanceProfile is a TestType enum value
TestTypeWebPerformanceProfile = "WEB_PERFORMANCE_PROFILE"
// TestTypeAppiumJavaJunit is a TestType enum value
TestTypeAppiumJavaJunit = "APPIUM_JAVA_JUNIT"
@ -13098,6 +13287,12 @@ const (
// TestTypeXctestUi is a TestType enum value
TestTypeXctestUi = "XCTEST_UI"
// TestTypeRemoteAccessRecord is a TestType enum value
TestTypeRemoteAccessRecord = "REMOTE_ACCESS_RECORD"
// TestTypeRemoteAccessReplay is a TestType enum value
TestTypeRemoteAccessReplay = "REMOTE_ACCESS_REPLAY"
)
const (

View File

@ -5428,6 +5428,10 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio
// the requester VPC. The requester VPC and accepter VPC cannot have overlapping
// CIDR blocks.
//
// Limitations and rules apply to a VPC peering connection. For more information,
// see the limitations (http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/vpc-peering-basics.html#vpc-peering-limitations)
// section in the VPC Peering Guide.
//
// The owner of the accepter VPC must accept the peering request to activate
// the peering connection. The VPC peering connection request expires after
// 7 days, after which it cannot be accepted or rejected.
@ -18933,9 +18937,9 @@ func (c *EC2) ModifyVpcEndpointServicePermissionsRequest(input *ModifyVpcEndpoin
// ModifyVpcEndpointServicePermissions API operation for Amazon Elastic Compute Cloud.
//
// Modifies the permissions for your VPC endpoint service. You can add or remove
// permissions for service consumers (IAM users, IAM roles, and AWS accounts)
// to discover your endpoint service.
// Modifies the permissions for your VPC endpoint service (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/endpoint-service.html).
// You can add or remove permissions for service consumers (IAM users, IAM roles,
// and AWS accounts) to connect to your endpoint service.
//
// 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
@ -29784,7 +29788,7 @@ type CreateVpcEndpointInput struct {
SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"`
// The service name. To get a list of available services, use the DescribeVpcEndpointServices
// request.
// request, or get the name from the service provider.
//
// ServiceName is a required field
ServiceName *string `type:"string" required:"true"`
@ -33150,6 +33154,18 @@ type DescribeAddressesInput struct {
// the Elastic IP address.
//
// * public-ip - The Elastic IP address.
//
// * tag:key=value - The key/value combination of a tag assigned to the resource.
// Specify the key of the tag in the filter name and the value of the tag
// in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
// for the filter name and X for the filter value.
//
// * tag-key - The key of a tag assigned to the resource. This filter is
// independent of the tag-value filter. For example, if you use both the
// filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources
// assigned both the tag key Purpose (regardless of what the tag's value
// is), and the tag value X (regardless of the tag's key). If you want to
// list only resources where Purpose is X, see the tag:key=value filter.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
// [EC2-Classic] One or more Elastic IP addresses.
@ -36657,6 +36673,18 @@ type DescribeLaunchTemplatesInput struct {
// * create-time - The time the launch template was created.
//
// * launch-template-name - The name of the launch template.
//
// * tag:key=value - The key/value combination of a tag assigned to the resource.
// Specify the key of the tag in the filter name and the value of the tag
// in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
// for the filter name and X for the filter value.
//
// * tag-key - The key of a tag assigned to the resource. This filter is
// independent of the tag-value filter. For example, if you use both the
// filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources
// assigned both the tag key Purpose (regardless of what the tag's value
// is), and the tag value X (regardless of the tag's key). If you want to
// list only resources where Purpose is X, see the tag:key=value filter.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
// One or more launch template IDs.
@ -40335,9 +40363,10 @@ type DescribeTagsInput struct {
// * resource-id - The resource ID.
//
// * resource-type - The resource type (customer-gateway | dhcp-options |
// image | instance | internet-gateway | network-acl | network-interface
// | reserved-instances | route-table | security-group | snapshot | spot-instances-request
// | subnet | volume | vpc | vpn-connection | vpn-gateway).
// elastic-ip | fpga-image | image | instance | internet-gateway | launch-template
// | natgateway | network-acl | network-interface | reserved-instances |
// route-table | security-group | snapshot | spot-instances-request | subnet
// | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway).
//
// * value - The tag value.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
@ -49533,7 +49562,8 @@ func (s *InternetGateway) SetTags(v []*Tag) *InternetGateway {
type InternetGatewayAttachment struct {
_ struct{} `type:"structure"`
// The current state of the attachment.
// The current state of the attachment. For an Internet gateway, the state is
// available when attached to a VPC; otherwise, this value is not returned.
State *string `locationName:"state" type:"string" enum:"AttachmentStatus"`
// The ID of the VPC.
@ -60763,7 +60793,9 @@ type RunInstancesInput struct {
// The IAM instance profile.
IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
// The ID of the AMI, which you can get by calling DescribeImages.
// The ID of the AMI, which you can get by calling DescribeImages. An AMI is
// required to launch an instance and must be specified here or in a launch
// template.
ImageId *string `type:"string"`
// Indicates whether an instance stops or terminates when you initiate shutdown
@ -66149,13 +66181,19 @@ type UserIdGroupPair struct {
// The name of the security group. In a request, use this parameter for a security
// group in EC2-Classic or a default VPC only. For a security group in a nondefault
// VPC, use the security group ID.
//
// For a referenced security group in another VPC, this value is not returned
// if the referenced security group is deleted.
GroupName *string `locationName:"groupName" type:"string"`
// The status of a VPC peering connection, if applicable.
PeeringStatus *string `locationName:"peeringStatus" type:"string"`
// The ID of an AWS account. For a referenced security group in another VPC,
// the account ID of the referenced security group is returned.
// The ID of an AWS account.
//
// For a referenced security group in another VPC, the account ID of the referenced
// security group is returned in the response. If the referenced security group
// is deleted, this value is not returned.
//
// [EC2-Classic] Required when adding or removing rules that reference a security
// group in another AWS account.

View File

@ -4,9 +4,8 @@
// requests to Amazon Elastic Compute Cloud.
//
// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
// in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your
// need to invest in hardware up front, so you can develop and deploy applications
// faster.
// in the AWS Cloud. Using Amazon EC2 eliminates your 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.
//

View File

@ -682,6 +682,9 @@ func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *re
// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
// The specified protocol or signature version is not supported.
//
// * ErrCodeOperationNotPermittedException "OperationNotPermitted"
// This operation is not allowed.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer
func (c *ELB) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) {
req, out := c.CreateLoadBalancerRequest(input)

View File

@ -3,27 +3,22 @@
// Package elb provides the client and types for making API
// requests to Elastic Load Balancing.
//
// A load balancer distributes incoming traffic across your EC2 instances. This
// enables you to increase the availability of your application. The load balancer
// also monitors the health of its registered instances and ensures that it
// routes traffic only to healthy instances. You configure your load balancer
// to accept incoming traffic by specifying one or more listeners, which are
// configured with a protocol and port number for connections from clients to
// the load balancer and a protocol and port number for connections from the
// load balancer to the instances.
// A load balancer can distribute incoming traffic across your EC2 instances.
// This enables you to increase the availability of your application. The load
// balancer also monitors the health of its registered instances and ensures
// that it routes traffic only to healthy instances. You configure your load
// balancer to accept incoming traffic by specifying one or more listeners,
// which are configured with a protocol and port number for connections from
// clients to the load balancer and a protocol and port number for connections
// from the load balancer to the instances.
//
// Elastic Load Balancing supports two types of load balancers: Classic Load
// Balancers and Application Load Balancers (new). A Classic Load Balancer makes
// routing and load balancing decisions either at the transport layer (TCP/SSL)
// or the application layer (HTTP/HTTPS), and supports either EC2-Classic or
// a VPC. An Application Load Balancer makes routing and load balancing decisions
// at the application layer (HTTP/HTTPS), supports path-based routing, and can
// route requests to one or more ports on each EC2 instance or container instance
// in your virtual private cloud (VPC). For more information, see the Elastic
// Load Balancing User Guide (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/what-is-load-balancing.html).
// Elastic Load Balancing supports three types of load balancers: Application
// Load Balancers, Network Load Balancers, and Classic Load Balancers. You can
// select a load balancer based on your application needs. For more information,
// see the Elastic Load Balancing User Guide (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/).
//
// This reference covers the 2012-06-01 API, which supports Classic Load Balancers.
// The 2015-12-01 API supports Application Load Balancers.
// The 2015-12-01 API supports Application Load Balancers and Network Load Balancers.
//
// To get started, create a load balancer with one or more listeners using CreateLoadBalancer.
// Register your instances with the load balancer using RegisterInstancesWithLoadBalancer.

View File

@ -91,6 +91,12 @@ const (
// The specified load balancer attribute does not exist.
ErrCodeLoadBalancerAttributeNotFoundException = "LoadBalancerAttributeNotFound"
// ErrCodeOperationNotPermittedException for service response error code
// "OperationNotPermitted".
//
// This operation is not allowed.
ErrCodeOperationNotPermittedException = "OperationNotPermitted"
// ErrCodePolicyNotFoundException for service response error code
// "PolicyNotFound".
//

View File

@ -245,14 +245,12 @@ func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request.
// Creates a listener for the specified Application Load Balancer or Network
// Load Balancer.
//
// You can create up to 10 listeners per load balancer.
//
// To update a listener, use ModifyListener. When you are finished with a listener,
// you can delete it using DeleteListener. If you are finished with both the
// listener and the load balancer, you can delete them both using DeleteLoadBalancer.
//
// This operation is idempotent, which means that it completes at most one time.
// If you attempt to create multiple listeners with the same settings, each
// call succeeds.
//
// For more information, see Listeners for Your Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html)
// in the Application Load Balancers Guide and Listeners for Your Network Load
// Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html)
@ -382,15 +380,13 @@ func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *
// your current load balancers, see DescribeLoadBalancers. When you are finished
// with a load balancer, you can delete it using DeleteLoadBalancer.
//
// For limit information, see Limits for Your Application Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html)
// You can create up to 20 load balancers per region per account. You can request
// an increase for the number of load balancers for your account. For more information,
// see Limits for Your Application Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html)
// in the Application Load Balancers Guide and Limits for Your Network Load
// Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html)
// in the Network Load Balancers Guide.
//
// This operation is idempotent, which means that it completes at most one time.
// If you attempt to create multiple load balancers with the same settings,
// each call succeeds.
//
// For more information, see Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html)
// in the Application Load Balancers Guide and Network Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html)
// in the Network Load Balancers Guide.
@ -439,6 +435,9 @@ func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *
// * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported"
// The specified Availability Zone is not supported.
//
// * ErrCodeOperationNotPermittedException "OperationNotPermitted"
// This operation is not allowed.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer
func (c *ELBV2) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) {
req, out := c.CreateLoadBalancerRequest(input)
@ -634,10 +633,6 @@ func (c *ELBV2) CreateTargetGroupRequest(input *CreateTargetGroupInput) (req *re
//
// To delete a target group, use DeleteTargetGroup.
//
// This operation is idempotent, which means that it completes at most one time.
// If you attempt to create multiple target groups with the same settings, each
// call succeeds.
//
// For more information, see Target Groups for Your Application Load Balancers
// (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html)
// in the Application Load Balancers Guide or Target Groups for Your Network
@ -1083,8 +1078,8 @@ func (c *ELBV2) DeregisterTargetsRequest(input *DeregisterTargetsInput) (req *re
// The specified target group does not exist.
//
// * ErrCodeInvalidTargetException "InvalidTarget"
// The specified target does not exist, is not in the same VPC as the target
// group, or has an unsupported instance type.
// The specified target does not exist or is not in the same VPC as the target
// group.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets
func (c *ELBV2) DeregisterTargets(input *DeregisterTargetsInput) (*DeregisterTargetsOutput, error) {
@ -2158,8 +2153,8 @@ func (c *ELBV2) DescribeTargetHealthRequest(input *DescribeTargetHealthInput) (r
//
// Returned Error Codes:
// * ErrCodeInvalidTargetException "InvalidTarget"
// The specified target does not exist, is not in the same VPC as the target
// group, or has an unsupported instance type.
// The specified target does not exist or is not in the same VPC as the target
// group.
//
// * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
// The specified target group does not exist.
@ -2743,8 +2738,8 @@ func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *reques
// You've reached the limit on the number of targets.
//
// * ErrCodeInvalidTargetException "InvalidTarget"
// The specified target does not exist, is not in the same VPC as the target
// group, or has an unsupported instance type.
// The specified target does not exist or is not in the same VPC as the target
// group.
//
// * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
// You've reached the limit on the number of times a target can be registered
@ -3821,11 +3816,10 @@ type CreateLoadBalancerInput struct {
// one subnet per Availability Zone. You must specify either subnets or subnet
// mappings.
//
// [Application Load Balancers] You must specify subnets from at least two Availability
// Zones. You cannot specify Elastic IP addresses for your subnets.
// [Network Load Balancers] You can specify one Elastic IP address per subnet.
//
// [Network Load Balancers] You can specify subnets from one or more Availability
// Zones. You can specify one Elastic IP address per subnet.
// [Application Load Balancers] You cannot specify Elastic IP addresses for
// your subnets.
SubnetMappings []*SubnetMapping `type:"list"`
// The IDs of the subnets to attach to the load balancer. You can specify only
@ -3834,9 +3828,6 @@ type CreateLoadBalancerInput struct {
//
// [Application Load Balancers] You must specify subnets from at least two Availability
// Zones.
//
// [Network Load Balancers] You can specify subnets from one or more Availability
// Zones.
Subnets []*string `type:"list"`
// One or more tags to assign to the load balancer.
@ -5606,10 +5597,6 @@ type Limit struct {
// * target-groups
//
// * targets-per-application-load-balancer
//
// * targets-per-availability-zone-per-network-load-balancer
//
// * targets-per-network-load-balancer
Name *string `type:"string"`
}
@ -7183,7 +7170,8 @@ type SetSubnetsInput struct {
// Zones. You can specify only one subnet per Availability Zone. You must specify
// either subnets or subnet mappings.
//
// You cannot specify Elastic IP addresses for your subnets.
// The load balancer is allocated one static IP address per subnet. You cannot
// specify your own Elastic IP addresses.
SubnetMappings []*SubnetMapping `type:"list"`
// The IDs of the subnets. You must specify subnets from at least two Availability
@ -7667,9 +7655,6 @@ type TargetGroupAttribute struct {
// from draining to unused. The range is 0-3600 seconds. The default value
// is 300 seconds.
//
// * proxy_protocol_v2.enabled - [Network Load Balancers] Indicates whether
// Proxy Protocol version 2 is enabled.
//
// * stickiness.enabled - [Application Load Balancers] Indicates whether
// sticky sessions are enabled. The value is true or false.
//

View File

@ -86,8 +86,8 @@ const (
// ErrCodeInvalidTargetException for service response error code
// "InvalidTarget".
//
// The specified target does not exist, is not in the same VPC as the target
// group, or has an unsupported instance type.
// The specified target does not exist or is not in the same VPC as the target
// group.
ErrCodeInvalidTargetException = "InvalidTarget"
// ErrCodeListenerNotFoundException for service response error code

19092
vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,304 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package gamelift provides the client and types for making API
// requests to Amazon GameLift.
//
// Amazon GameLift is a managed service for developers who need a scalable,
// dedicated server solution for their multiplayer games. Amazon GameLift provides
// tools for the following tasks: (1) acquire computing resources and deploy
// game servers, (2) scale game server capacity to meet player demand, (3) host
// game sessions and manage player access, and (4) track in-depth metrics on
// player usage and server performance.
//
// The Amazon GameLift service API includes two important function sets:
//
// * Manage game sessions and player access -- Retrieve information on available
// game sessions; create new game sessions; send player requests to join
// a game session.
//
// * Configure and manage game server resources -- Manage builds, fleets,
// queues, and aliases; set autoscaling policies; retrieve logs and metrics.
//
// This reference guide describes the low-level service API for Amazon GameLift.
// You can use the API functionality with these tools:
//
// * The Amazon Web Services software development kit (AWS SDK (http://aws.amazon.com/tools/#sdk))
// is available in multiple languages (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-supported.html#gamelift-supported-clients)
// including C++ and C#. Use the SDK to access the API programmatically from
// an application, such as a game client.
//
// * The AWS command-line interface (http://aws.amazon.com/cli/) (CLI) tool
// is primarily useful for handling administrative actions, such as setting
// up and managing Amazon GameLift settings and resources. You can use the
// AWS CLI to manage all of your AWS services.
//
// * The AWS Management Console (https://console.aws.amazon.com/gamelift/home)
// for Amazon GameLift provides a web interface to manage your Amazon GameLift
// settings and resources. The console includes a dashboard for tracking
// key resources, including builds and fleets, and displays usage and performance
// metrics for your games as customizable graphs.
//
// * Amazon GameLift Local is a tool for testing your game's integration
// with Amazon GameLift before deploying it on the service. This tools supports
// a subset of key API actions, which can be called from either the AWS CLI
// or programmatically. See Testing an Integration (http://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing-local.html).
//
// MORE RESOURCES
//
// * Amazon GameLift Developer Guide (http://docs.aws.amazon.com/gamelift/latest/developerguide/)
// -- Learn more about Amazon GameLift features and how to use them.
//
// * Lumberyard and Amazon GameLift Tutorials (https://gamedev.amazon.com/forums/tutorials)
// -- Get started fast with walkthroughs and sample projects.
//
// * GameDev Blog (http://aws.amazon.com/blogs/gamedev/) -- Stay up to date
// with new features and techniques.
//
// * GameDev Forums (https://gamedev.amazon.com/forums/spaces/123/gamelift-discussion.html)
// -- Connect with the GameDev community.
//
// * Amazon GameLift Document History (http://docs.aws.amazon.com/gamelift/latest/developerguide/doc-history.html)
// -- See changes to the Amazon GameLift service, SDKs, and documentation,
// as well as links to release notes.
//
// API SUMMARY
//
// This list offers a functional overview of the Amazon GameLift service API.
//
// Managing Games and Players
//
// Use these actions to start new game sessions, find existing game sessions,
// track game session status and other information, and enable player access
// to game sessions.
//
// * Discover existing game sessions
//
// SearchGameSessions -- Retrieve all available game sessions or search for
// game sessions that match a set of criteria.
//
// * Start new game sessions
//
// Start new games with Queues to find the best available hosting resources
// across multiple regions, minimize player latency, and balance game session
// activity for efficiency and cost effectiveness.
//
// StartGameSessionPlacement -- Request a new game session placement and add
// one or more players to it.
//
// DescribeGameSessionPlacement -- Get details on a placement request, including
// status.
//
// StopGameSessionPlacement -- Cancel a placement request.
//
// CreateGameSession -- Start a new game session on a specific fleet. Available
// in Amazon GameLift Local.
//
// * Start new game sessions with FlexMatch matchmaking
//
// StartMatchmaking -- Request matchmaking for one players or a group who want
// to play together.
//
// DescribeMatchmaking -- Get details on a matchmaking request, including status.
//
// AcceptMatch -- Register that a player accepts a proposed match, for matches
// that require player acceptance.
//
// StopMatchmaking -- Cancel a matchmaking request.
//
// * Manage game session data
//
// DescribeGameSessions -- Retrieve metadata for one or more game sessions,
// including length of time active and current player count. Available in
// Amazon GameLift Local.
//
// DescribeGameSessionDetails -- Retrieve metadata and the game session protection
// setting for one or more game sessions.
//
// UpdateGameSession -- Change game session settings, such as maximum player
// count and join policy.
//
// GetGameSessionLogUrl -- Get the location of saved logs for a game session.
//
// * Manage player sessions
//
// CreatePlayerSession -- Send a request for a player to join a game session.
// Available in Amazon GameLift Local.
//
// CreatePlayerSessions -- Send a request for multiple players to join a game
// session. Available in Amazon GameLift Local.
//
// DescribePlayerSessions -- Get details on player activity, including status,
// playing time, and player data. Available in Amazon GameLift Local.
//
// Setting Up and Managing Game Servers
//
// When setting up Amazon GameLift resources for your game, you first create
// a game build (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html)
// and upload it to Amazon GameLift. You can then use these actions to configure
// and manage a fleet of resources to run your game servers, scale capacity
// to meet player demand, access performance and utilization metrics, and more.
//
// * Manage game builds
//
// CreateBuild -- Create a new build using files stored in an Amazon S3 bucket.
// (Update uploading permissions with RequestUploadCredentials.) To create
// a build and upload files from a local path, use the AWS CLI command upload-build.
//
// ListBuilds -- Get a list of all builds uploaded to a Amazon GameLift region.
//
// DescribeBuild -- Retrieve information associated with a build.
//
// UpdateBuild -- Change build metadata, including build name and version.
//
// DeleteBuild -- Remove a build from Amazon GameLift.
//
// * Manage fleets
//
// CreateFleet -- Configure and activate a new fleet to run a build's game servers.
//
// ListFleets -- Get a list of all fleet IDs in a Amazon GameLift region (all
// statuses).
//
// DeleteFleet -- Terminate a fleet that is no longer running game servers or
// hosting players.
//
// View / update fleet configurations.
//
// DescribeFleetAttributes / UpdateFleetAttributes -- View or change a fleet's
// metadata and settings for game session protection and resource creation
// limits.
//
// DescribeFleetPortSettings / UpdateFleetPortSettings -- View or change the
// inbound permissions (IP address and port setting ranges) allowed for a
// fleet.
//
// DescribeRuntimeConfiguration / UpdateRuntimeConfiguration -- View or change
// what server processes (and how many) to run on each instance in a fleet.
//
// * Control fleet capacity
//
// DescribeEC2InstanceLimits -- Retrieve maximum number of instances allowed
// for the current AWS account and the current usage level.
//
// DescribeFleetCapacity / UpdateFleetCapacity -- Retrieve the capacity settings
// and the current number of instances in a fleet; adjust fleet capacity
// settings to scale up or down.
//
// Autoscale -- Manage autoscaling rules and apply them to a fleet.
//
// PutScalingPolicy -- Create a new autoscaling policy, or update an existing
// one.
//
// DescribeScalingPolicies -- Retrieve an existing autoscaling policy.
//
// DeleteScalingPolicy -- Delete an autoscaling policy and stop it from affecting
// a fleet's capacity.
//
// * Manage VPC peering connections for fleets
//
// CreateVpcPeeringAuthorization -- Authorize a peering connection to one of
// your VPCs.
//
// DescribeVpcPeeringAuthorizations -- Retrieve valid peering connection authorizations.
//
//
// DeleteVpcPeeringAuthorization -- Delete a peering connection authorization.
//
// CreateVpcPeeringConnection -- Establish a peering connection between the
// VPC for a Amazon GameLift fleet and one of your VPCs.
//
// DescribeVpcPeeringConnections -- Retrieve information on active or pending
// VPC peering connections with a Amazon GameLift fleet.
//
// DeleteVpcPeeringConnection -- Delete a VPC peering connection with a Amazon
// GameLift fleet.
//
// * Access fleet activity statistics
//
// DescribeFleetUtilization -- Get current data on the number of server processes,
// game sessions, and players currently active on a fleet.
//
// DescribeFleetEvents -- Get a fleet's logged events for a specified time span.
//
// DescribeGameSessions -- Retrieve metadata associated with one or more game
// sessions, including length of time active and current player count.
//
// * Remotely access an instance
//
// DescribeInstances -- Get information on each instance in a fleet, including
// instance ID, IP address, and status.
//
// GetInstanceAccess -- Request access credentials needed to remotely connect
// to a specified instance in a fleet.
//
// * Manage fleet aliases
//
// CreateAlias -- Define a new alias and optionally assign it to a fleet.
//
// ListAliases -- Get all fleet aliases defined in a Amazon GameLift region.
//
// DescribeAlias -- Retrieve information on an existing alias.
//
// UpdateAlias -- Change settings for a alias, such as redirecting it from one
// fleet to another.
//
// DeleteAlias -- Remove an alias from the region.
//
// ResolveAlias -- Get the fleet ID that a specified alias points to.
//
// * Manage game session queues
//
// CreateGameSessionQueue -- Create a queue for processing requests for new
// game sessions.
//
// DescribeGameSessionQueues -- Retrieve game session queues defined in a Amazon
// GameLift region.
//
// UpdateGameSessionQueue -- Change the configuration of a game session queue.
//
// DeleteGameSessionQueue -- Remove a game session queue from the region.
//
// * Manage FlexMatch resources
//
// CreateMatchmakingConfiguration -- Create a matchmaking configuration with
// instructions for building a player group and placing in a new game session.
//
//
// DescribeMatchmakingConfigurations -- Retrieve matchmaking configurations
// defined a Amazon GameLift region.
//
// UpdateMatchmakingConfiguration -- Change settings for matchmaking configuration.
// queue.
//
// DeleteMatchmakingConfiguration -- Remove a matchmaking configuration from
// the region.
//
// CreateMatchmakingRuleSet -- Create a set of rules to use when searching for
// player matches.
//
// DescribeMatchmakingRuleSets -- Retrieve matchmaking rule sets defined in
// a Amazon GameLift region.
//
// ValidateMatchmakingRuleSet -- Verify syntax for a set of matchmaking rules.
//
// See https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01 for more information on this service.
//
// See gamelift package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/gamelift/
//
// Using the Client
//
// To contact Amazon GameLift 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 GameLift client GameLift for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/gamelift/#New
package gamelift

View File

@ -0,0 +1,102 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package gamelift
const (
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// The requested operation would cause a conflict with the current state of
// a service resource associated with the request. Resolve the conflict before
// retrying this request.
ErrCodeConflictException = "ConflictException"
// ErrCodeFleetCapacityExceededException for service response error code
// "FleetCapacityExceededException".
//
// The specified fleet has no available instances to fulfill a CreateGameSession
// request. Clients can retry such requests immediately or after a waiting period.
ErrCodeFleetCapacityExceededException = "FleetCapacityExceededException"
// ErrCodeGameSessionFullException for service response error code
// "GameSessionFullException".
//
// The game instance is currently full and cannot allow the requested player(s)
// to join. Clients can retry such requests immediately or after a waiting period.
ErrCodeGameSessionFullException = "GameSessionFullException"
// ErrCodeIdempotentParameterMismatchException for service response error code
// "IdempotentParameterMismatchException".
//
// A game session with this custom ID string already exists in this fleet. Resolve
// this conflict before retrying this request.
ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException"
// ErrCodeInternalServiceException for service response error code
// "InternalServiceException".
//
// The service encountered an unrecoverable internal failure while processing
// the request. Clients can retry such requests immediately or after a waiting
// period.
ErrCodeInternalServiceException = "InternalServiceException"
// ErrCodeInvalidFleetStatusException for service response error code
// "InvalidFleetStatusException".
//
// The requested operation would cause a conflict with the current state of
// a resource associated with the request and/or the fleet. Resolve the conflict
// before retrying.
ErrCodeInvalidFleetStatusException = "InvalidFleetStatusException"
// ErrCodeInvalidGameSessionStatusException for service response error code
// "InvalidGameSessionStatusException".
//
// The requested operation would cause a conflict with the current state of
// a resource associated with the request and/or the game instance. Resolve
// the conflict before retrying.
ErrCodeInvalidGameSessionStatusException = "InvalidGameSessionStatusException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// One or more parameter values in the request are invalid. Correct the invalid
// parameter values before retrying.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// The requested operation would cause the resource to exceed the allowed service
// limit. Resolve the issue before retrying.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeNotFoundException for service response error code
// "NotFoundException".
//
// A service resource associated with the request could not be found. Clients
// should not retry such requests.
ErrCodeNotFoundException = "NotFoundException"
// ErrCodeTerminalRoutingStrategyException for service response error code
// "TerminalRoutingStrategyException".
//
// The service is unable to resolve the routing for a particular alias because
// it has a terminal RoutingStrategy associated with it. The message returned
// in this exception is the message defined in the routing strategy itself.
// Such requests should only be retried if the routing strategy for the specified
// alias is modified.
ErrCodeTerminalRoutingStrategyException = "TerminalRoutingStrategyException"
// ErrCodeUnauthorizedException for service response error code
// "UnauthorizedException".
//
// The client failed authentication. Clients should not retry such requests.
ErrCodeUnauthorizedException = "UnauthorizedException"
// ErrCodeUnsupportedRegionException for service response error code
// "UnsupportedRegionException".
//
// The requested operation is not supported in the region specified.
ErrCodeUnsupportedRegionException = "UnsupportedRegionException"
)

View File

@ -0,0 +1,95 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package gamelift
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"
)
// GameLift provides the API operation methods for making requests to
// Amazon GameLift. See this package's package overview docs
// for details on the service.
//
// GameLift methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type GameLift 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 = "gamelift" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the GameLift 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 GameLift client from just a session.
// svc := gamelift.New(mySession)
//
// // Create a GameLift client with additional configuration
// svc := gamelift.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *GameLift {
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) *GameLift {
svc := &GameLift{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2015-10-01",
JSONVersion: "1.1",
TargetPrefix: "GameLift",
},
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 GameLift operation and runs any
// custom request initialization.
func (c *GameLift) 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
}

File diff suppressed because it is too large Load Diff

View File

@ -3475,6 +3475,59 @@ func (s AcceptInvitationOutput) GoString() string {
return s.String()
}
// The IAM access key details (IAM user information) of a user that engaged
// in the activity that prompted GuardDuty to generate a finding.
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/AccessKeyDetails
type AccessKeyDetails struct {
_ struct{} `type:"structure"`
// Access key ID of the user.
AccessKeyId *string `locationName:"accessKeyId" type:"string"`
// The principal ID of the user.
PrincipalId *string `locationName:"principalId" type:"string"`
// The name of the user.
UserName *string `locationName:"userName" type:"string"`
// The type of the user.
UserType *string `locationName:"userType" type:"string"`
}
// String returns the string representation
func (s AccessKeyDetails) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AccessKeyDetails) GoString() string {
return s.String()
}
// SetAccessKeyId sets the AccessKeyId field's value.
func (s *AccessKeyDetails) SetAccessKeyId(v string) *AccessKeyDetails {
s.AccessKeyId = &v
return s
}
// SetPrincipalId sets the PrincipalId field's value.
func (s *AccessKeyDetails) SetPrincipalId(v string) *AccessKeyDetails {
s.PrincipalId = &v
return s
}
// SetUserName sets the UserName field's value.
func (s *AccessKeyDetails) SetUserName(v string) *AccessKeyDetails {
s.UserName = &v
return s
}
// SetUserType sets the UserType field's value.
func (s *AccessKeyDetails) SetUserType(v string) *AccessKeyDetails {
s.UserType = &v
return s
}
// An object containing the member's accountId and email address.
// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/AccountDetail
type AccountDetail struct {
@ -7028,6 +7081,10 @@ func (s *RemotePortDetails) SetPortName(v string) *RemotePortDetails {
type Resource struct {
_ struct{} `type:"structure"`
// The IAM access key details (IAM user information) of a user that engaged
// in the activity that prompted GuardDuty to generate a finding.
AccessKeyDetails *AccessKeyDetails `locationName:"accessKeyDetails" type:"structure"`
// The information about the EC2 instance associated with the activity that
// prompted GuardDuty to generate a finding.
InstanceDetails *InstanceDetails `locationName:"instanceDetails" type:"structure"`
@ -7046,6 +7103,12 @@ func (s Resource) GoString() string {
return s.String()
}
// SetAccessKeyDetails sets the AccessKeyDetails field's value.
func (s *Resource) SetAccessKeyDetails(v *AccessKeyDetails) *Resource {
s.AccessKeyDetails = v
return s
}
// SetInstanceDetails sets the InstanceDetails field's value.
func (s *Resource) SetInstanceDetails(v *InstanceDetails) *Resource {
s.InstanceDetails = v

View File

@ -100,14 +100,11 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R
// Lambda function access policy is limited to 20 KB.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodePreconditionFailedException "PreconditionFailedException"
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API to retrieve the
// latest RevisionId for your resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission
func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) {
@ -205,14 +202,6 @@ func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Reque
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias
func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) {
@ -326,14 +315,6 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping
// The resource already exists.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
@ -440,14 +421,6 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request
// The resource already exists.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
@ -542,14 +515,6 @@ func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Reque
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias
func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
@ -644,14 +609,6 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping
func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
@ -751,14 +708,6 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
@ -836,7 +785,8 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren
// DeleteFunctionConcurrency API operation for AWS Lambda.
//
// Removes concurrent execution limits from this function.
// Removes concurrent execution limits from this function. For more information,
// see concurrent-executions.
//
// 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
@ -854,14 +804,6 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
@ -951,14 +893,6 @@ func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req
//
// Returned Error Codes:
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
@ -1056,14 +990,6 @@ func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, ou
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias
func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) {
@ -1157,14 +1083,6 @@ func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput)
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping
func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
@ -1262,14 +1180,6 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
@ -1372,14 +1282,6 @@ func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfiguration
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
@ -1477,14 +1379,6 @@ func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request,
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
@ -1570,6 +1464,13 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output
//
// This operation requires permission for the lambda:InvokeFunction action.
//
// The TooManyRequestsException noted below will return the following: ConcurrentInvocationLimitExceeded
// will be returned if you have no functions with reserved concurrency and have
// exceeded your account concurrent limit or if a function without reserved
// concurrency exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// will be returned when a function with reserved concurrency exceeds its configured
// concurrency limit.
//
// 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.
@ -1596,14 +1497,6 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output
// The content type of the Invoke request body is not JSON.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
@ -1850,14 +1743,6 @@ func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Reque
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases
func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
@ -1966,14 +1851,6 @@ func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsIn
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings
func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) {
@ -2119,14 +1996,6 @@ func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.R
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
@ -2273,14 +2142,6 @@ func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, ou
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags
func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
@ -2372,14 +2233,6 @@ func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInpu
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction
func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) {
@ -2474,18 +2327,15 @@ func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
//
// * ErrCodePreconditionFailedException "PreconditionFailedException"
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API to retrieve the
// latest RevisionId for your resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion
func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) {
req, out := c.PublishVersionRequest(input)
@ -2557,7 +2407,7 @@ func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInpu
// Note that Lambda automatically reserves a buffer of 100 concurrent executions
// for functions without any reserved concurrency limit. This means if your
// account limit is 1000, you have a total of 900 available to allocate to individual
// functions.
// functions. For more information, see concurrent-executions.
//
// 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
@ -2580,14 +2430,6 @@ func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInpu
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency
func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) {
@ -2692,14 +2534,11 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodePreconditionFailedException "PreconditionFailedException"
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API to retrieve the
// latest RevisionId for your resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission
func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) {
@ -2794,14 +2633,6 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource
func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
@ -2895,14 +2726,6 @@ func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.R
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource
func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
@ -2997,14 +2820,11 @@ func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Reque
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodePreconditionFailedException "PreconditionFailedException"
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API to retrieve the
// latest RevisionId for your resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias
func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) {
@ -3111,14 +2931,6 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
@ -3220,18 +3032,15 @@ func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
//
// * ErrCodePreconditionFailedException "PreconditionFailedException"
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API to retrieve the
// latest RevisionId for your resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode
func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) {
req, out := c.UpdateFunctionCodeRequest(input)
@ -3331,18 +3140,15 @@ func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigu
// API, that AWS Lambda is unable to assume you will get this exception.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// * ErrCodePreconditionFailedException "PreconditionFailedException"
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API to retrieve the
// latest RevisionId for your resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration
func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) {
req, out := c.UpdateFunctionConfigurationRequest(input)
@ -3391,7 +3197,7 @@ type AccountLimit struct {
TotalCodeSize *int64 `type:"long"`
// The number of concurrent executions available to functions that do not have
// concurrency limits set.
// concurrency limits set. For more information, see concurrent-executions.
UnreservedConcurrentExecutions *int64 `type:"integer"`
}
@ -3527,6 +3333,13 @@ type AddPermissionInput struct {
// arn:aws:lambda:aws-region:acct-id:function:function-name
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
// An optional value you can use to ensure you are updating the latest update
// of the function version or alias. If the RevisionID you pass doesn't match
// the latest RevisionId of the function or alias, it will fail with an error
// message, advising you to retrieve the latest function version or alias RevisionID
// using either or .
RevisionId *string `type:"string"`
// This parameter is used for S3 and SES. The AWS account ID (without a hyphen)
// of the source owner. For example, if the SourceArn identifies a bucket, then
// this is the bucket owner's account ID. You can use this additional condition
@ -3623,6 +3436,12 @@ func (s *AddPermissionInput) SetQualifier(v string) *AddPermissionInput {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *AddPermissionInput) SetRevisionId(v string) *AddPermissionInput {
s.RevisionId = &v
return s
}
// SetSourceAccount sets the SourceAccount field's value.
func (s *AddPermissionInput) SetSourceAccount(v string) *AddPermissionInput {
s.SourceAccount = &v
@ -3686,6 +3505,9 @@ type AliasConfiguration struct {
// Alias name.
Name *string `min:"1" type:"string"`
// Represents the latest updated revision of the function or alias.
RevisionId *string `type:"string"`
// Specifies an additional function versions the alias points to, allowing you
// to dictate what percentage of traffic will invoke each version. For more
// information, see lambda-traffic-shifting-using-aliases.
@ -3726,6 +3548,12 @@ func (s *AliasConfiguration) SetName(v string) *AliasConfiguration {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *AliasConfiguration) SetRevisionId(v string) *AliasConfiguration {
s.RevisionId = &v
return s
}
// SetRoutingConfig sets the RoutingConfig field's value.
func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *AliasConfiguration {
s.RoutingConfig = v
@ -3738,9 +3566,9 @@ func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *Ali
type AliasRoutingConfiguration struct {
_ struct{} `type:"structure"`
// Set this property value to dictate what percentage of traffic will invoke
// the updated function version. If set to an empty string, 100 percent of traffic
// will invoke function-version.
// Set this value to dictate what percentage of traffic will invoke the updated
// function version. If set to an empty string, 100 percent of traffic will
// invoke function-version. For more information, see lambda-traffic-shifting-using-aliases.
AdditionalVersionWeights map[string]*float64 `type:"map"`
}
@ -4057,7 +3885,7 @@ type CreateFunctionInput struct {
// Node v0.10.42 is currently marked as deprecated. You must migrate existing
// functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3
// or nodejs6.10) as soon as possible. Failure to do so will result in an invalid
// parmaeter error being returned. Note that you will have to follow this procedure
// parameter error being returned. Note that you will have to follow this procedure
// for each region that contains functions written in the Node v0.10.42 runtime.
//
// Runtime is a required field
@ -4368,6 +4196,7 @@ type DeleteFunctionConcurrencyInput struct {
_ struct{} `type:"structure"`
// The name of the function you are removing concurrent execution limits from.
// For more information, see concurrent-executions.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
@ -4865,6 +4694,9 @@ type FunctionConfiguration struct {
// of 64 MB.
MemorySize *int64 `min:"128" type:"integer"`
// Represents the latest updated revision of the function or alias.
RevisionId *string `type:"string"`
// The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it
// executes your function to access any other Amazon Web Services (AWS) resources.
Role *string `type:"string"`
@ -4969,6 +4801,12 @@ func (s *FunctionConfiguration) SetMemorySize(v int64) *FunctionConfiguration {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *FunctionConfiguration) SetRevisionId(v string) *FunctionConfiguration {
s.RevisionId = &v
return s
}
// SetRole sets the Role field's value.
func (s *FunctionConfiguration) SetRole(v string) *FunctionConfiguration {
s.Role = &v
@ -5299,7 +5137,8 @@ type GetFunctionOutput struct {
// The object for the Lambda function location.
Code *FunctionCodeLocation `type:"structure"`
// The concurrent execution limit set for this function.
// The concurrent execution limit set for this function. For more information,
// see concurrent-executions.
Concurrency *PutFunctionConcurrencyOutput `type:"structure"`
// A complex type that describes function metadata.
@ -5417,6 +5256,9 @@ type GetPolicyOutput struct {
// returns the same as a string using a backslash ("\") as an escape character
// in the JSON.
Policy *string `type:"string"`
// Represents the latest updated revision of the function or alias.
RevisionId *string `type:"string"`
}
// String returns the string representation
@ -5435,6 +5277,12 @@ func (s *GetPolicyOutput) SetPolicy(v string) *GetPolicyOutput {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput {
s.RevisionId = &v
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsyncRequest
type InvokeAsyncInput struct {
_ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"`
@ -5643,7 +5491,7 @@ type InvokeOutput struct {
_ struct{} `type:"structure" payload:"Payload"`
// The function version that has been executed. This value is returned only
// if the invocation type is RequestResponse.
// if the invocation type is RequestResponse. For more information, see lambda-traffic-shifting-using-aliases.
ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"`
// Indicates whether an error occurred while executing the Lambda function.
@ -6247,6 +6095,13 @@ type PublishVersionInput struct {
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// An optional value you can use to ensure you are updating the latest update
// of the function version or alias. If the RevisionID you pass doesn't match
// the latest RevisionId of the function or alias, it will fail with an error
// message, advising you to retrieve the latest function version or alias RevisionID
// using either or .
RevisionId *string `type:"string"`
}
// String returns the string representation
@ -6293,16 +6148,24 @@ func (s *PublishVersionInput) SetFunctionName(v string) *PublishVersionInput {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *PublishVersionInput) SetRevisionId(v string) *PublishVersionInput {
s.RevisionId = &v
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrencyRequest
type PutFunctionConcurrencyInput struct {
_ struct{} `type:"structure"`
// The name of the function you are setting concurrent execution limits on.
// For more information, see concurrent-executions.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// The concurrent execution limit reserved for this function.
// The concurrent execution limit reserved for this function. For more information,
// see concurrent-executions.
//
// ReservedConcurrentExecutions is a required field
ReservedConcurrentExecutions *int64 `type:"integer" required:"true"`
@ -6353,7 +6216,8 @@ func (s *PutFunctionConcurrencyInput) SetReservedConcurrentExecutions(v int64) *
type PutFunctionConcurrencyOutput struct {
_ struct{} `type:"structure"`
// The number of concurrent executions reserved for this function.
// The number of concurrent executions reserved for this function. For more
// information, see concurrent-executions.
ReservedConcurrentExecutions *int64 `type:"integer"`
}
@ -6394,6 +6258,13 @@ type RemovePermissionInput struct {
// ARN.
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
// An optional value you can use to ensure you are updating the latest update
// of the function version or alias. If the RevisionID you pass doesn't match
// the latest RevisionId of the function or alias, it will fail with an error
// message, advising you to retrieve the latest function version or alias RevisionID
// using either or .
RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"`
// Statement ID of the permission to remove.
//
// StatementId is a required field
@ -6447,6 +6318,12 @@ func (s *RemovePermissionInput) SetQualifier(v string) *RemovePermissionInput {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *RemovePermissionInput) SetRevisionId(v string) *RemovePermissionInput {
s.RevisionId = &v
return s
}
// SetStatementId sets the StatementId field's value.
func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput {
s.StatementId = &v
@ -6681,6 +6558,13 @@ type UpdateAliasInput struct {
// Name is a required field
Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
// An optional value you can use to ensure you are updating the latest update
// of the function version or alias. If the RevisionID you pass doesn't match
// the latest RevisionId of the function or alias, it will fail with an error
// message, advising you to retrieve the latest function version or alias RevisionID
// using either or .
RevisionId *string `type:"string"`
// Specifies an additional version your alias can point to, allowing you to
// dictate what percentage of traffic will invoke each version. For more information,
// see lambda-traffic-shifting-using-aliases.
@ -6746,6 +6630,12 @@ func (s *UpdateAliasInput) SetName(v string) *UpdateAliasInput {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *UpdateAliasInput) SetRevisionId(v string) *UpdateAliasInput {
s.RevisionId = &v
return s
}
// SetRoutingConfig sets the RoutingConfig field's value.
func (s *UpdateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *UpdateAliasInput {
s.RoutingConfig = v
@ -6867,6 +6757,13 @@ type UpdateFunctionCodeInput struct {
// function and publish a version as an atomic operation.
Publish *bool `type:"boolean"`
// An optional value you can use to ensure you are updating the latest update
// of the function version or alias. If the RevisionID you pass doesn't match
// the latest RevisionId of the function or alias, it will fail with an error
// message, advising you to retrieve the latest function version or alias RevisionID
// using either or .
RevisionId *string `type:"string"`
// Amazon S3 bucket name where the .zip file containing your deployment package
// is stored. This bucket must reside in the same AWS Region where you are creating
// the Lambda function.
@ -6942,6 +6839,12 @@ func (s *UpdateFunctionCodeInput) SetPublish(v bool) *UpdateFunctionCodeInput {
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *UpdateFunctionCodeInput) SetRevisionId(v string) *UpdateFunctionCodeInput {
s.RevisionId = &v
return s
}
// SetS3Bucket sets the S3Bucket field's value.
func (s *UpdateFunctionCodeInput) SetS3Bucket(v string) *UpdateFunctionCodeInput {
s.S3Bucket = &v
@ -7009,6 +6912,13 @@ type UpdateFunctionConfigurationInput struct {
// MB.
MemorySize *int64 `min:"128" type:"integer"`
// An optional value you can use to ensure you are updating the latest update
// of the function version or alias. If the RevisionID you pass doesn't match
// the latest RevisionId of the function or alias, it will fail with an error
// message, advising you to retrieve the latest function version or alias RevisionID
// using either or .
RevisionId *string `type:"string"`
// The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when
// it executes your function.
Role *string `type:"string"`
@ -7117,6 +7027,12 @@ func (s *UpdateFunctionConfigurationInput) SetMemorySize(v int64) *UpdateFunctio
return s
}
// SetRevisionId sets the RevisionId field's value.
func (s *UpdateFunctionConfigurationInput) SetRevisionId(v string) *UpdateFunctionConfigurationInput {
s.RevisionId = &v
return s
}
// SetRole sets the Role field's value.
func (s *UpdateFunctionConfigurationInput) SetRole(v string) *UpdateFunctionConfigurationInput {
s.Role = &v
@ -7284,8 +7200,14 @@ const (
// RuntimeDotnetcore10 is a Runtime enum value
RuntimeDotnetcore10 = "dotnetcore1.0"
// RuntimeDotnetcore20 is a Runtime enum value
RuntimeDotnetcore20 = "dotnetcore2.0"
// RuntimeNodejs43Edge is a Runtime enum value
RuntimeNodejs43Edge = "nodejs4.3-edge"
// RuntimeGo1X is a Runtime enum value
RuntimeGo1X = "go1.x"
)
const (

View File

@ -109,6 +109,14 @@ const (
// Lambda function access policy is limited to 20 KB.
ErrCodePolicyLengthExceededException = "PolicyLengthExceededException"
// ErrCodePreconditionFailedException for service response error code
// "PreconditionFailedException".
//
// The RevisionId provided does not match the latest RevisionId for the Lambda
// function or alias. Call the GetFunction or the GetAlias API to retrieve the
// latest RevisionId for your resource.
ErrCodePreconditionFailedException = "PreconditionFailedException"
// ErrCodeRequestTooLargeException for service response error code
// "RequestTooLargeException".
//
@ -144,15 +152,6 @@ const (
// ErrCodeTooManyRequestsException for service response error code
// "TooManyRequestsException".
//
// You will get this exception for the following reasons. ConcurrentInvocationLimitExceeded
// is returned if you have no functions with reserved-concurrency and have exceeded
// your account concurrent limit or if a function without reserved concurrency
// exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded
// is returned when a function with reserved concurrency exceeds its configured
// concurrent limit. CallerRateLimitExceeded is returned when your account limit
// is exceeded and you have not reserved concurrency on any function. For more
// information, see concurrent-executions
ErrCodeTooManyRequestsException = "TooManyRequestsException"
// ErrCodeUnsupportedMediaTypeException for service response error code

View File

@ -1501,20 +1501,17 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl
//
// Creates a new DB instance that acts as a Read Replica for an existing source
// DB instance. You can create a Read Replica for a DB instance running MySQL,
// MariaDB, or PostgreSQL.
// 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
// action to create a DB instance for an Aurora DB cluster.
//
// All Read Replica DB instances are created as Single-AZ deployments 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.
// 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.
//
// The source DB instance must have backup retention enabled.
//
// For more information, see Working with PostgreSQL, MySQL, and MariaDB Read
// Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html).
// Your source DB instance must have backup retention enabled.
//
// 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
@ -9443,6 +9440,8 @@ 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.
//
// 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.
@ -9564,6 +9563,8 @@ 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.
//
// 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.
@ -10233,6 +10234,41 @@ func (s *CharacterSet) SetCharacterSetName(v string) *CharacterSet {
return s
}
// The configuration setting for the log types to be enabled for export to CloudWatch
// Logs for a specific DB instance or DB cluster.
// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CloudwatchLogsExportConfiguration
type CloudwatchLogsExportConfiguration struct {
_ struct{} `type:"structure"`
// The list of log types to disable.
DisableLogTypes []*string `type:"list"`
// The list of log types to enable.
EnableLogTypes []*string `type:"list"`
}
// String returns the string representation
func (s CloudwatchLogsExportConfiguration) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudwatchLogsExportConfiguration) GoString() string {
return s.String()
}
// SetDisableLogTypes sets the DisableLogTypes field's value.
func (s *CloudwatchLogsExportConfiguration) SetDisableLogTypes(v []*string) *CloudwatchLogsExportConfiguration {
s.DisableLogTypes = v
return s
}
// SetEnableLogTypes sets the EnableLogTypes field's value.
func (s *CloudwatchLogsExportConfiguration) SetEnableLogTypes(v []*string) *CloudwatchLogsExportConfiguration {
s.EnableLogTypes = v
return s
}
// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterParameterGroupMessage
type CopyDBClusterParameterGroupInput struct {
_ struct{} `type:"structure"`
@ -11716,7 +11752,7 @@ type CreateDBInstanceInput struct {
//
// Constraints to the amount of storage for each storage type are the following:
//
// * General Purpose (SSD) storage (gp2): Must be an integer from 5 to 16384.
// * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384.
//
// * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384.
//
@ -11726,7 +11762,7 @@ type CreateDBInstanceInput struct {
//
// Constraints to the amount of storage for each storage type are the following:
//
// * General Purpose (SSD) storage (gp2): Must be an integer from 5 to 16384.
// * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384.
//
// * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384.
//
@ -11736,7 +11772,7 @@ type CreateDBInstanceInput struct {
//
// Constraints to the amount of storage for each storage type are the following:
//
// * General Purpose (SSD) storage (gp2): Must be an integer from 5 to 16384.
// * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384.
//
// * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384.
//
@ -11746,7 +11782,7 @@ type CreateDBInstanceInput struct {
//
// Constraints to the amount of storage for each storage type are the following:
//
// * General Purpose (SSD) storage (gp2): Must be an integer from 10 to 16384.
// * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384.
//
// * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384.
//
@ -11958,6 +11994,10 @@ type CreateDBInstanceInput struct {
// Directory Service.
DomainIAMRoleName *string `type:"string"`
// The list of log types that need to be enabled for exporting to CloudWatch
// Logs.
EnableCloudwatchLogsExports []*string `type:"list"`
// True to enable mapping of AWS Identity and Access Management (IAM) accounts
// to database accounts, and otherwise false.
//
@ -12028,7 +12068,9 @@ type CreateDBInstanceInput struct {
//
// MariaDB
//
// * 10.1.26 (supported in all AWS Regions)
// * 10.2.11 (supported in all AWS Regions)
//
// 10.1.26 (supported in all AWS Regions)
//
// * 10.1.23 (supported in all AWS Regions)
//
@ -12036,7 +12078,7 @@ type CreateDBInstanceInput struct {
//
// * 10.1.14 (supported in all AWS Regions except us-east-2)
//
// 10.0.32 (supported in all AWS Regions)
// * 10.0.32 (supported in all AWS Regions)
//
// * 10.0.31 (supported in all AWS Regions)
//
@ -12049,11 +12091,11 @@ type CreateDBInstanceInput struct {
//
// Microsoft SQL Server 2017
//
// 14.00.1000.169.v1 (supported for all editions, and all AWS Regions)
// * 14.00.1000.169.v1 (supported for all editions, and all AWS Regions)
//
// Microsoft SQL Server 2016
//
// 13.00.4451.0.v1 (supported for all editions, and all AWS Regions)
// * 13.00.4451.0.v1 (supported for all editions, and all AWS Regions)
//
// * 13.00.4422.0.v1 (supported for all editions, and all AWS Regions)
//
@ -12061,7 +12103,7 @@ type CreateDBInstanceInput struct {
//
// Microsoft SQL Server 2014
//
// 12.00.5546.0.v1 (supported for all editions, and all AWS Regions)
// * 12.00.5546.0.v1 (supported for all editions, and all AWS Regions)
//
// * 12.00.5000.0.v1 (supported for all editions, and all AWS Regions)
//
@ -12070,7 +12112,7 @@ type CreateDBInstanceInput struct {
//
// Microsoft SQL Server 2012
//
// 11.00.6594.0.v1 (supported for all editions, and all AWS Regions)
// * 11.00.6594.0.v1 (supported for all editions, and all AWS Regions)
//
// * 11.00.6020.0.v1 (supported for all editions, and all AWS Regions)
//
@ -12082,8 +12124,8 @@ type CreateDBInstanceInput struct {
//
// Microsoft SQL Server 2008 R2
//
// 10.50.6529.0.v1 (supported for all editions, and all AWS Regions except us-east-2,
// ca-central-1, and eu-west-2)
// * 10.50.6529.0.v1 (supported for all editions, and all AWS Regions except
// us-east-2, ca-central-1, and eu-west-2)
//
// * 10.50.6000.34.v1 (supported for all editions, and all AWS Regions except
// us-east-2, ca-central-1, and eu-west-2)
@ -12093,86 +12135,21 @@ type CreateDBInstanceInput struct {
//
// MySQL
//
// 5.7.19 (supported in all AWS regions)
// * 5.7.19 (supported in all AWS regions)
//
// * 5.7.17 (supported in all AWS regions)
//
// * 5.7.16 (supported in all AWS regions)
//
// * 5.6.37 (supported in all AWS Regions)
// 5.6.37(supported in all AWS Regions)
//
// * 5.6.35 (supported in all AWS Regions)
// 5.6.35(supported in all AWS Regions)
//
// * 5.6.34 (supported in all AWS Regions)
// 5.6.34(supported in all AWS Regions)
//
// * 5.6.29 (supported in all AWS Regions)
// 5.6.29(supported in all AWS Regions)
//
// * 5.6.27 (supported in all AWS Regions except us-east-2, ca-central-1,
// eu-west-2)
//
// 5.5.57(supported in all AWS Regions)
//
// 5.5.54(supported in all AWS Regions)
//
// 5.5.53(supported in all AWS Regions)
//
// 5.5.46(supported in all AWS Regions)
//
// Oracle 12c
//
// 12.1.0.2.v9(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v8(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v7(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v6(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v5(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v4(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v3(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v2(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// 12.1.0.2.v1(supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
//
// Oracle 11g
//
// 11.2.0.4.v13(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v12(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v11(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v10(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v9(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v8(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v7(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v6(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v5(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v4(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v3(supported for EE, SE1, and SE, in all AWS regions)
//
// 11.2.0.4.v1(supported for EE, SE1, and SE, in all AWS regions)
//
// PostgreSQL
//
// Version 9.6.x: 9.6.5 | 9.6.3 | 9.6.2 | 9.6.1
//
// Version 9.5.x: 9.5.9 | 9.5.7 | 9.5.6 | 9.5.4 | 9.5.2
//
// Version 9.4.x: 9.4.14 | 9.4.12 | 9.4.11 | 9.4.9 | 9.4.7
//
// Version 9.3.x: 9.3.19 | 9.3.17 | 9.3.16 | 9.3.14 | 9.3.12
// 5.6.27
EngineVersion *string `type:"string"`
// The amount of Provisioned IOPS (input/output operations per second) to be
@ -12616,6 +12593,12 @@ func (s *CreateDBInstanceInput) SetDomainIAMRoleName(v string) *CreateDBInstance
return s
}
// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value.
func (s *CreateDBInstanceInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBInstanceInput {
s.EnableCloudwatchLogsExports = v
return s
}
// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value.
func (s *CreateDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBInstanceInput {
s.EnableIAMDatabaseAuthentication = &v
@ -12865,6 +12848,9 @@ type CreateDBInstanceReadReplicaInput struct {
// DestinationRegion is used for presigning the request to a given region.
DestinationRegion *string `type:"string"`
// The list of logs that the new DB instance is to export to CloudWatch Logs.
EnableCloudwatchLogsExports []*string `type:"list"`
// True to enable mapping of AWS Identity and Access Management (IAM) accounts
// to database accounts, and otherwise false.
//
@ -12922,6 +12908,16 @@ type CreateDBInstanceReadReplicaInput struct {
// a MonitoringRoleArn value.
MonitoringRoleArn *string `type:"string"`
// 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.
MultiAZ *bool `type:"boolean"`
// The option group the DB instance is associated with. If omitted, the default
// option group for the engine specified is used.
OptionGroupName *string `type:"string"`
@ -13113,6 +13109,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetDestinationRegion(v string) *Creat
return s
}
// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value.
func (s *CreateDBInstanceReadReplicaInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBInstanceReadReplicaInput {
s.EnableCloudwatchLogsExports = v
return s
}
// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value.
func (s *CreateDBInstanceReadReplicaInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBInstanceReadReplicaInput {
s.EnableIAMDatabaseAuthentication = &v
@ -13149,6 +13151,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetMonitoringRoleArn(v string) *Creat
return s
}
// SetMultiAZ sets the MultiAZ field's value.
func (s *CreateDBInstanceReadReplicaInput) SetMultiAZ(v bool) *CreateDBInstanceReadReplicaInput {
s.MultiAZ = &v
return s
}
// SetOptionGroupName sets the OptionGroupName field's value.
func (s *CreateDBInstanceReadReplicaInput) SetOptionGroupName(v string) *CreateDBInstanceReadReplicaInput {
s.OptionGroupName = &v
@ -14852,6 +14860,10 @@ type DBEngineVersion struct {
// The version number of the database engine.
EngineVersion *string `type:"string"`
// The types of logs that the database engine has available for export to CloudWatch
// Logs.
ExportableLogTypes []*string `type:"list"`
// A list of the character sets supported by this engine for the CharacterSetName
// parameter of the CreateDBInstance action.
SupportedCharacterSets []*CharacterSet `locationNameList:"CharacterSet" type:"list"`
@ -14860,6 +14872,10 @@ type DBEngineVersion struct {
// of the CreateDBInstance action.
SupportedTimezones []*Timezone `locationNameList:"Timezone" type:"list"`
// A value that indicates whether the engine version supports exporting the
// log types specified by ExportableLogTypes to CloudWatch Logs.
SupportsLogExportsToCloudwatchLogs *bool `type:"boolean"`
// A list of engine versions that this database engine version can be upgraded
// to.
ValidUpgradeTarget []*UpgradeTarget `locationNameList:"UpgradeTarget" type:"list"`
@ -14911,6 +14927,12 @@ func (s *DBEngineVersion) SetEngineVersion(v string) *DBEngineVersion {
return s
}
// SetExportableLogTypes sets the ExportableLogTypes field's value.
func (s *DBEngineVersion) SetExportableLogTypes(v []*string) *DBEngineVersion {
s.ExportableLogTypes = v
return s
}
// SetSupportedCharacterSets sets the SupportedCharacterSets field's value.
func (s *DBEngineVersion) SetSupportedCharacterSets(v []*CharacterSet) *DBEngineVersion {
s.SupportedCharacterSets = v
@ -14923,6 +14945,12 @@ func (s *DBEngineVersion) SetSupportedTimezones(v []*Timezone) *DBEngineVersion
return s
}
// SetSupportsLogExportsToCloudwatchLogs sets the SupportsLogExportsToCloudwatchLogs field's value.
func (s *DBEngineVersion) SetSupportsLogExportsToCloudwatchLogs(v bool) *DBEngineVersion {
s.SupportsLogExportsToCloudwatchLogs = &v
return s
}
// SetValidUpgradeTarget sets the ValidUpgradeTarget field's value.
func (s *DBEngineVersion) SetValidUpgradeTarget(v []*UpgradeTarget) *DBEngineVersion {
s.ValidUpgradeTarget = v
@ -15018,6 +15046,10 @@ type DBInstance struct {
// The Active Directory Domain membership records associated with the DB instance.
DomainMemberships []*DomainMembership `locationNameList:"DomainMembership" type:"list"`
// A list of log types that this DB instance is configured to export to CloudWatch
// Logs.
EnabledCloudwatchLogsExports []*string `type:"list"`
// Specifies the connection endpoint.
Endpoint *Endpoint `type:"structure"`
@ -15286,6 +15318,12 @@ func (s *DBInstance) SetDomainMemberships(v []*DomainMembership) *DBInstance {
return s
}
// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value.
func (s *DBInstance) SetEnabledCloudwatchLogsExports(v []*string) *DBInstance {
s.EnabledCloudwatchLogsExports = v
return s
}
// SetEndpoint sets the Endpoint field's value.
func (s *DBInstance) SetEndpoint(v *Endpoint) *DBInstance {
s.Endpoint = v
@ -22047,6 +22085,10 @@ type ModifyDBInstanceInput struct {
// Indicates the certificate that needs to be associated with the instance.
CACertificateIdentifier *string `type:"string"`
// The configuration setting for the log types to be enabled for export to CloudWatch
// Logs for a specific DB instance or DB cluster.
CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"`
// True to copy all tags from the DB instance to snapshots of the DB instance,
// and otherwise false. The default is false.
CopyTagsToSnapshot *bool `type:"boolean"`
@ -22296,8 +22338,6 @@ type ModifyDBInstanceInput struct {
// 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
// window unless the ApplyImmediately parameter is set to true for this request.
//
// Constraints: Cannot be specified if the DB instance is a Read Replica.
MultiAZ *bool `type:"boolean"`
// The new DB instance identifier for the DB instance when renaming a DB instance.
@ -22502,6 +22542,12 @@ func (s *ModifyDBInstanceInput) SetCACertificateIdentifier(v string) *ModifyDBIn
return s
}
// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value.
func (s *ModifyDBInstanceInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBInstanceInput {
s.CloudwatchLogsExportConfiguration = v
return s
}
// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value.
func (s *ModifyDBInstanceInput) SetCopyTagsToSnapshot(v bool) *ModifyDBInstanceInput {
s.CopyTagsToSnapshot = &v
@ -24300,6 +24346,43 @@ func (s *Parameter) SetSource(v string) *Parameter {
return s
}
// A list of the log types whose configuration is still pending. In other words,
// these log types are in the process of being activated or deactivated.
// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PendingCloudwatchLogsExports
type PendingCloudwatchLogsExports struct {
_ struct{} `type:"structure"`
// Log types that are in the process of being enabled. After they are enabled,
// these log types are exported to CloudWatch Logs.
LogTypesToDisable []*string `type:"list"`
// Log types that are in the process of being deactivated. After they are deactivated,
// these log types aren't exported to CloudWatch Logs.
LogTypesToEnable []*string `type:"list"`
}
// String returns the string representation
func (s PendingCloudwatchLogsExports) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PendingCloudwatchLogsExports) GoString() string {
return s.String()
}
// SetLogTypesToDisable sets the LogTypesToDisable field's value.
func (s *PendingCloudwatchLogsExports) SetLogTypesToDisable(v []*string) *PendingCloudwatchLogsExports {
s.LogTypesToDisable = v
return s
}
// SetLogTypesToEnable sets the LogTypesToEnable field's value.
func (s *PendingCloudwatchLogsExports) SetLogTypesToEnable(v []*string) *PendingCloudwatchLogsExports {
s.LogTypesToEnable = v
return s
}
// Provides information about a pending maintenance action for a resource.
// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PendingMaintenanceAction
type PendingMaintenanceAction struct {
@ -24425,6 +24508,10 @@ type PendingModifiedValues struct {
// Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment.
MultiAZ *bool `type:"boolean"`
// A list of the log types whose configuration is still pending. In other words,
// these log types are in the process of being activated or deactivated.
PendingCloudwatchLogsExports *PendingCloudwatchLogsExports `type:"structure"`
// Specifies the pending port for the DB instance.
Port *int64 `type:"integer"`
@ -24508,6 +24595,12 @@ func (s *PendingModifiedValues) SetMultiAZ(v bool) *PendingModifiedValues {
return s
}
// SetPendingCloudwatchLogsExports sets the PendingCloudwatchLogsExports field's value.
func (s *PendingModifiedValues) SetPendingCloudwatchLogsExports(v *PendingCloudwatchLogsExports) *PendingModifiedValues {
s.PendingCloudwatchLogsExports = v
return s
}
// SetPort sets the Port field's value.
func (s *PendingModifiedValues) SetPort(v int64) *PendingModifiedValues {
s.Port = &v
@ -26608,6 +26701,10 @@ type RestoreDBInstanceFromDBSnapshotInput struct {
// Directory Service.
DomainIAMRoleName *string `type:"string"`
// The list of logs that the restored DB instance is to export to CloudWatch
// Logs.
EnableCloudwatchLogsExports []*string `type:"list"`
// True to enable mapping of AWS Identity and Access Management (IAM) accounts
// to database accounts, and otherwise false.
//
@ -26626,8 +26723,8 @@ type RestoreDBInstanceFromDBSnapshotInput struct {
//
// Default: The same as source
//
// Constraint: Must be compatible with the engine of the source. You can restore
// a MariaDB 10.1 DB instance from a MySQL 5.6 snapshot.
// Constraint: Must be compatible with the engine of the source. For example,
// you can restore a MariaDB 10.1 DB instance from a MySQL 5.6 snapshot.
//
// Valid Values:
//
@ -26823,6 +26920,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetDomainIAMRoleName(v string) *R
return s
}
// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value.
func (s *RestoreDBInstanceFromDBSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceFromDBSnapshotInput {
s.EnableCloudwatchLogsExports = v
return s
}
// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value.
func (s *RestoreDBInstanceFromDBSnapshotInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBInstanceFromDBSnapshotInput {
s.EnableIAMDatabaseAuthentication = &v
@ -27008,6 +27111,10 @@ type RestoreDBInstanceFromS3Input struct {
// A DB subnet group to associate with this DB instance.
DBSubnetGroupName *string `type:"string"`
// The list of logs that the restored DB instance is to export to CloudWatch
// Logs.
EnableCloudwatchLogsExports []*string `type:"list"`
// True to enable mapping of AWS Identity and Access Management (IAM) accounts
// to database accounts, and otherwise false.
//
@ -27300,6 +27407,12 @@ func (s *RestoreDBInstanceFromS3Input) SetDBSubnetGroupName(v string) *RestoreDB
return s
}
// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value.
func (s *RestoreDBInstanceFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceFromS3Input {
s.EnableCloudwatchLogsExports = v
return s
}
// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value.
func (s *RestoreDBInstanceFromS3Input) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBInstanceFromS3Input {
s.EnableIAMDatabaseAuthentication = &v
@ -27538,6 +27651,10 @@ type RestoreDBInstanceToPointInTimeInput struct {
// Directory Service.
DomainIAMRoleName *string `type:"string"`
// The list of logs that the restored DB instance is to export to CloudWatch
// Logs.
EnableCloudwatchLogsExports []*string `type:"list"`
// True to enable mapping of AWS Identity and Access Management (IAM) accounts
// to database accounts, and otherwise false.
//
@ -27659,7 +27776,7 @@ type RestoreDBInstanceToPointInTimeInput struct {
//
// Constraints:
//
// * Must match the identifier of an existing DBInstance.
// * Must match the identifier of an existing DB instance.
//
// SourceDBInstanceIdentifier is a required field
SourceDBInstanceIdentifier *string `type:"string" required:"true"`
@ -27779,6 +27896,12 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetDomainIAMRoleName(v string) *Re
return s
}
// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value.
func (s *RestoreDBInstanceToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceToPointInTimeInput {
s.EnableCloudwatchLogsExports = v
return s
}
// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value.
func (s *RestoreDBInstanceToPointInTimeInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBInstanceToPointInTimeInput {
s.EnableIAMDatabaseAuthentication = &v

View File

@ -7784,11 +7784,8 @@ func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Reques
// The parameter already exists. You can't create duplicate parameters.
//
// * ErrCodeHierarchyLevelLimitExceededException "HierarchyLevelLimitExceededException"
// A hierarchy can have a maximum of five levels. For example:
//
// /Finance/Prod/IAD/OS/WinServ2016/license15
//
// For more information, see Working with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html).
// A hierarchy can have a maximum of 15 levels. For more information, see Working
// with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html).
//
// * ErrCodeHierarchyTypeMismatchException "HierarchyTypeMismatchException"
// Parameter Store does not support changing a parameter type in a hierarchy.

View File

@ -150,11 +150,8 @@ const (
// ErrCodeHierarchyLevelLimitExceededException for service response error code
// "HierarchyLevelLimitExceededException".
//
// A hierarchy can have a maximum of five levels. For example:
//
// /Finance/Prod/IAD/OS/WinServ2016/license15
//
// For more information, see Working with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html).
// A hierarchy can have a maximum of 15 levels. For more information, see Working
// with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html).
ErrCodeHierarchyLevelLimitExceededException = "HierarchyLevelLimitExceededException"
// ErrCodeHierarchyTypeMismatchException for service response error code

View File

@ -1,22 +1,37 @@
## 1.8.0 (Unreleased)
## 1.8.0 (January 29, 2018)
FEATURES:
* **New Resource:** `aws_dynamodb_global_table` ([#2517](https://github.com/terraform-providers/terraform-provider-aws/issues/2517))
* **New Resource:** `aws_gamelift_build` ([#2843](https://github.com/terraform-providers/terraform-provider-aws/issues/2843))
ENHANCEMENTS:
* datasource/aws_kms_alias: Add target_key_arn attribute [GH-2551]
* resource/aws_appautoscaling_target: Support updating max_capacity, min_capacity, and role_arn attributes [GH-2950]
* resource/aws_elasticsearch_domain: Add support for encrypt_at_rest [GH-2632]
* resource/aws_kms_alias: Add target_key_arn attribute [GH-3096]
* resource/aws_route: Allow adding IPv6 routes to instances and network interfaces [GH-2265]
* resource/aws_vpn_connection: Add inside CIDR and pre-shared key attributes [GH-1862]
* resource/aws_api_gateway_integration: Allow update of content_handling attributes [GH-3123]
* resource/cognito_user_pool: support pre_token_generation in lambda_config [GH-3093]
* provider: `cn-northwest-1` region is now supported ([#3142](https://github.com/terraform-providers/terraform-provider-aws/issues/3142))
* data-source/aws_kms_alias: Add target_key_arn attribute ([#2551](https://github.com/terraform-providers/terraform-provider-aws/issues/2551))
* resource/aws_api_gateway_integration: Allow update of content_handling attributes ([#3123](https://github.com/terraform-providers/terraform-provider-aws/issues/3123))
* resource/aws_appautoscaling_target: Support updating max_capacity, min_capacity, and role_arn attributes ([#2950](https://github.com/terraform-providers/terraform-provider-aws/issues/2950))
* resource/aws_cloudwatch_log_subscription_filter: Add support for distribution ([#3046](https://github.com/terraform-providers/terraform-provider-aws/issues/3046))
* resource/aws_cognito_user_pool: support pre_token_generation in lambda_config ([#3093](https://github.com/terraform-providers/terraform-provider-aws/issues/3093))
* resource/aws_elasticsearch_domain: Add support for encrypt_at_rest ([#2632](https://github.com/terraform-providers/terraform-provider-aws/issues/2632))
* resource/aws_emr_cluster: Support CustomAmiId ([#2766](https://github.com/terraform-providers/terraform-provider-aws/issues/2766))
* resource/aws_kms_alias: Add target_key_arn attribute ([#3096](https://github.com/terraform-providers/terraform-provider-aws/issues/3096))
* resource/aws_route: Allow adding IPv6 routes to instances and network interfaces ([#2265](https://github.com/terraform-providers/terraform-provider-aws/issues/2265))
* resource/aws_sqs_queue: Retry queue creation on QueueDeletedRecently error ([#3113](https://github.com/terraform-providers/terraform-provider-aws/issues/3113))
* resource/aws_vpn_connection: Add inside CIDR and pre-shared key attributes ([#1862](https://github.com/terraform-providers/terraform-provider-aws/issues/1862))
BUG FIXES:
* resource/aws_ebs_snapshot: Fix `kms_key_id` attribute handling [GH-3085]
* resource/aws_eip_assocation: Retry association for pending instances [GH-3072]
* resource/aws_kinesis_firehose_delivery_stream: Prevent panic on missing S3 configuration prefix [GH-3073]
* resource/aws_sqs_queue_policy: Prevent missing policy error on read [GH-2739]
* resource/aws_appautoscaling_policy: Support additional predefined metric types in validation [[#3122](https://github.com/terraform-providers/terraform-provider-aws/issues/3122)]]
* resource/aws_dynamodb_table: Recognize changes in `non_key_attributes` ([#3136](https://github.com/terraform-providers/terraform-provider-aws/issues/3136))
* resource/aws_ebs_snapshot: Fix `kms_key_id` attribute handling ([#3085](https://github.com/terraform-providers/terraform-provider-aws/issues/3085))
* resource/aws_eip_assocation: Retry association for pending instances ([#3072](https://github.com/terraform-providers/terraform-provider-aws/issues/3072))
* resource/aws_elastic_beanstalk_application: Prevent crash on reading missing application ([#3171](https://github.com/terraform-providers/terraform-provider-aws/issues/3171))
* resource/aws_kinesis_firehose_delivery_stream: Prevent panic on missing S3 configuration prefix ([#3073](https://github.com/terraform-providers/terraform-provider-aws/issues/3073))
* resource/aws_lambda_function: Retry updates for IAM eventual consistency ([#3116](https://github.com/terraform-providers/terraform-provider-aws/issues/3116))
* resource/aws_route53_record: Suppress uppercase alias name diff ([#3119](https://github.com/terraform-providers/terraform-provider-aws/issues/3119))
* resource/aws_sqs_queue_policy: Prevent missing policy error on read ([#2739](https://github.com/terraform-providers/terraform-provider-aws/issues/2739))
* resource/aws_rds_cluster: Retry deletion on InvalidDBClusterStateFault ([#3028](https://github.com/terraform-providers/terraform-provider-aws/issues/3028))
## 1.7.1 (January 19, 2018)

View File

@ -50,6 +50,7 @@ import (
"github.com/aws/aws-sdk-go/service/elbv2"
"github.com/aws/aws-sdk-go/service/emr"
"github.com/aws/aws-sdk-go/service/firehose"
"github.com/aws/aws-sdk-go/service/gamelift"
"github.com/aws/aws-sdk-go/service/glacier"
"github.com/aws/aws-sdk-go/service/glue"
"github.com/aws/aws-sdk-go/service/guardduty"
@ -177,6 +178,7 @@ type AWSClient struct {
iamconn *iam.IAM
kinesisconn *kinesis.Kinesis
kmsconn *kms.KMS
gameliftconn *gamelift.GameLift
firehoseconn *firehose.Firehose
inspectorconn *inspector.Inspector
elasticacheconn *elasticache.ElastiCache
@ -224,6 +226,9 @@ func (c *AWSClient) IsChinaCloud() bool {
if c.region == "cn-north-1" {
return true
}
if c.region == "cn-northwest-1" {
return true
}
return false
}
@ -423,6 +428,7 @@ func (c *Config) Client() (interface{}, error) {
client.esconn = elasticsearch.New(sess)
client.firehoseconn = firehose.New(sess)
client.inspectorconn = inspector.New(sess)
client.gameliftconn = gamelift.New(sess)
client.glacierconn = glacier.New(sess)
client.guarddutyconn = guardduty.New(sess)
client.iotconn = iot.New(sess)
@ -503,6 +509,7 @@ func (c *Config) ValidateRegion() error {
"ap-southeast-2",
"ca-central-1",
"cn-north-1",
"cn-northwest-1",
"eu-central-1",
"eu-west-1",
"eu-west-2",

View File

@ -23,6 +23,7 @@ var cloudTrailServiceAccountPerRegionMap = map[string]string{
"eu-west-2": "282025262664",
"eu-west-3": "262312530599",
"sa-east-1": "814480443879",
"cn-northwest-1": "681348832753",
}
func dataSourceAwsCloudTrailServiceAccount() *schema.Resource {

View File

@ -3,12 +3,10 @@ package aws
import (
"bytes"
"fmt"
"log"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/hashicorp/errwrap"
"github.com/hashicorp/terraform/helper/hashcode"
"github.com/hashicorp/terraform/helper/schema"
)
@ -174,21 +172,41 @@ func dataSourceAwsDynamoDbTable() *schema.Resource {
}
func dataSourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) error {
dynamodbconn := meta.(*AWSClient).dynamodbconn
conn := meta.(*AWSClient).dynamodbconn
name := d.Get("name").(string)
req := &dynamodb.DescribeTableInput{
TableName: aws.String(name),
}
log.Printf("[DEBUG] Reading DynamoDB Table: %s", req)
result, err := dynamodbconn.DescribeTable(req)
result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{
TableName: aws.String(d.Get("name").(string)),
})
if err != nil {
return errwrap.Wrapf("Error retrieving DynamoDB table: {{err}}", err)
return fmt.Errorf("Error retrieving DynamoDB table: %s", err)
}
d.SetId(*result.Table.TableName)
return flattenAwsDynamoDbTableResource(d, meta, result.Table)
err = flattenAwsDynamoDbTableResource(d, result.Table)
if err != nil {
return err
}
ttlOut, err := conn.DescribeTimeToLive(&dynamodb.DescribeTimeToLiveInput{
TableName: aws.String(d.Id()),
})
if err != nil {
return err
}
if ttlOut.TimeToLiveDescription != nil {
err := d.Set("ttl", flattenDynamoDbTtl(ttlOut.TimeToLiveDescription))
if err != nil {
return err
}
}
tags, err := readDynamoDbTableTags(d.Get("arn").(string), conn)
if err != nil {
return err
}
d.Set("tags", tags)
return nil
}

View File

@ -15,6 +15,7 @@ var elbAccountIdPerRegionMap = map[string]string{
"ap-southeast-2": "783225319266",
"ca-central-1": "985666609251",
"cn-north-1": "638102146993",
"cn-northwest-1": "037604701340",
"eu-central-1": "054676820928",
"eu-west-1": "156460612806",
"eu-west-2": "652711504416",

View File

@ -18,6 +18,7 @@ var redshiftServiceAccountPerRegionMap = map[string]string{
"ap-southeast-2": "762762565011",
"ap-northeast-1": "404641285394",
"ca-central-1": "907379612154",
"cn-northwest-1": "660998842044",
"eu-central-1": "053454850223",
"eu-west-1": "210876761215",
"eu-west-2": "307160386991",

View File

@ -325,6 +325,7 @@ func Provider() terraform.ResourceProvider {
"aws_dx_connection": resourceAwsDxConnection(),
"aws_dx_connection_association": resourceAwsDxConnectionAssociation(),
"aws_dynamodb_table": resourceAwsDynamoDbTable(),
"aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(),
"aws_ebs_snapshot": resourceAwsEbsSnapshot(),
"aws_ebs_volume": resourceAwsEbsVolume(),
"aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(),
@ -357,6 +358,7 @@ func Provider() terraform.ResourceProvider {
"aws_emr_instance_group": resourceAwsEMRInstanceGroup(),
"aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(),
"aws_flow_log": resourceAwsFlowLog(),
"aws_gamelift_build": resourceAwsGameliftBuild(),
"aws_glacier_vault": resourceAwsGlacierVault(),
"aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(),
"aws_guardduty_detector": resourceAwsGuardDutyDetector(),

View File

@ -48,6 +48,10 @@ func resourceAwsCloudwatchLogSubscriptionFilter() *schema.Resource {
Optional: true,
Computed: true,
},
"distribution": {
Type: schema.TypeString,
Optional: true,
},
},
}
}
@ -121,6 +125,10 @@ func getAwsCloudWatchLogsSubscriptionFilterInput(d *schema.ResourceData) cloudwa
params.RoleArn = aws.String(d.Get("role_arn").(string))
}
if _, ok := d.GetOk("distribution"); ok {
params.Distribution = aws.String(d.Get("distribution").(string))
}
return params
}

View File

@ -0,0 +1,321 @@
package aws
import (
"fmt"
"log"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
)
func resourceAwsDynamoDbGlobalTable() *schema.Resource {
return &schema.Resource{
Create: resourceAwsDynamoDbGlobalTableCreate,
Read: resourceAwsDynamoDbGlobalTableRead,
Update: resourceAwsDynamoDbGlobalTableUpdate,
Delete: resourceAwsDynamoDbGlobalTableDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(1 * time.Minute),
Update: schema.DefaultTimeout(1 * time.Minute),
Delete: schema.DefaultTimeout(1 * time.Minute),
},
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validateAwsDynamoDbGlobalTableName,
},
"replica": {
Type: schema.TypeSet,
Required: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"region_name": {
Type: schema.TypeString,
Required: true,
},
},
},
},
"arn": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
func resourceAwsDynamoDbGlobalTableCreate(d *schema.ResourceData, meta interface{}) error {
dynamodbconn := meta.(*AWSClient).dynamodbconn
globalTableName := d.Get("name").(string)
input := &dynamodb.CreateGlobalTableInput{
GlobalTableName: aws.String(globalTableName),
ReplicationGroup: expandAwsDynamoDbReplicas(d.Get("replica").(*schema.Set).List()),
}
log.Printf("[DEBUG] Creating DynamoDB Global Table: %#v", input)
_, err := dynamodbconn.CreateGlobalTable(input)
if err != nil {
return err
}
d.SetId(globalTableName)
log.Println("[INFO] Waiting for DynamoDB Global Table to be created")
stateConf := &resource.StateChangeConf{
Pending: []string{
dynamodb.GlobalTableStatusCreating,
dynamodb.GlobalTableStatusDeleting,
dynamodb.GlobalTableStatusUpdating,
},
Target: []string{
dynamodb.GlobalTableStatusActive,
},
Refresh: resourceAwsDynamoDbGlobalTableStateRefreshFunc(d, meta),
Timeout: d.Timeout(schema.TimeoutCreate),
MinTimeout: 10 * time.Second,
}
_, err = stateConf.WaitForState()
if err != nil {
return err
}
return resourceAwsDynamoDbGlobalTableRead(d, meta)
}
func resourceAwsDynamoDbGlobalTableRead(d *schema.ResourceData, meta interface{}) error {
globalTableDescription, err := resourceAwsDynamoDbGlobalTableRetrieve(d, meta)
if err != nil {
return err
}
if globalTableDescription == nil {
log.Printf("[WARN] DynamoDB Global Table %q not found, removing from state", d.Id())
d.SetId("")
return nil
}
return flattenAwsDynamoDbGlobalTable(d, globalTableDescription)
}
func resourceAwsDynamoDbGlobalTableUpdate(d *schema.ResourceData, meta interface{}) error {
dynamodbconn := meta.(*AWSClient).dynamodbconn
if d.HasChange("replica") {
o, n := d.GetChange("replica")
if o == nil {
o = new(schema.Set)
}
if n == nil {
n = new(schema.Set)
}
os := o.(*schema.Set)
ns := n.(*schema.Set)
replicaUpdateCreateReplicas := expandAwsDynamoDbReplicaUpdateCreateReplicas(ns.Difference(os).List())
replicaUpdateDeleteReplicas := expandAwsDynamoDbReplicaUpdateDeleteReplicas(os.Difference(ns).List())
replicaUpdates := make([]*dynamodb.ReplicaUpdate, 0, (len(replicaUpdateCreateReplicas) + len(replicaUpdateDeleteReplicas)))
for _, replicaUpdate := range replicaUpdateCreateReplicas {
replicaUpdates = append(replicaUpdates, replicaUpdate)
}
for _, replicaUpdate := range replicaUpdateDeleteReplicas {
replicaUpdates = append(replicaUpdates, replicaUpdate)
}
input := &dynamodb.UpdateGlobalTableInput{
GlobalTableName: aws.String(d.Id()),
ReplicaUpdates: replicaUpdates,
}
log.Printf("[DEBUG] Updating DynamoDB Global Table: %#v", input)
if _, err := dynamodbconn.UpdateGlobalTable(input); err != nil {
return err
}
log.Println("[INFO] Waiting for DynamoDB Global Table to be updated")
stateConf := &resource.StateChangeConf{
Pending: []string{
dynamodb.GlobalTableStatusCreating,
dynamodb.GlobalTableStatusDeleting,
dynamodb.GlobalTableStatusUpdating,
},
Target: []string{
dynamodb.GlobalTableStatusActive,
},
Refresh: resourceAwsDynamoDbGlobalTableStateRefreshFunc(d, meta),
Timeout: d.Timeout(schema.TimeoutUpdate),
MinTimeout: 10 * time.Second,
}
_, err := stateConf.WaitForState()
if err != nil {
return err
}
}
return nil
}
// Deleting a DynamoDB Global Table is represented by removing all replicas.
func resourceAwsDynamoDbGlobalTableDelete(d *schema.ResourceData, meta interface{}) error {
dynamodbconn := meta.(*AWSClient).dynamodbconn
input := &dynamodb.UpdateGlobalTableInput{
GlobalTableName: aws.String(d.Id()),
ReplicaUpdates: expandAwsDynamoDbReplicaUpdateDeleteReplicas(d.Get("replica").(*schema.Set).List()),
}
log.Printf("[DEBUG] Deleting DynamoDB Global Table: %#v", input)
if _, err := dynamodbconn.UpdateGlobalTable(input); err != nil {
return err
}
log.Println("[INFO] Waiting for DynamoDB Global Table to be destroyed")
stateConf := &resource.StateChangeConf{
Pending: []string{
dynamodb.GlobalTableStatusActive,
dynamodb.GlobalTableStatusCreating,
dynamodb.GlobalTableStatusDeleting,
dynamodb.GlobalTableStatusUpdating,
},
Target: []string{},
Refresh: resourceAwsDynamoDbGlobalTableStateRefreshFunc(d, meta),
Timeout: d.Timeout(schema.TimeoutDelete),
MinTimeout: 10 * time.Second,
}
_, err := stateConf.WaitForState()
return err
}
func resourceAwsDynamoDbGlobalTableRetrieve(d *schema.ResourceData, meta interface{}) (*dynamodb.GlobalTableDescription, error) {
dynamodbconn := meta.(*AWSClient).dynamodbconn
input := &dynamodb.DescribeGlobalTableInput{
GlobalTableName: aws.String(d.Id()),
}
log.Printf("[DEBUG] Retrieving DynamoDB Global Table: %#v", input)
output, err := dynamodbconn.DescribeGlobalTable(input)
if err != nil {
if isAWSErr(err, dynamodb.ErrCodeGlobalTableNotFoundException, "") {
return nil, nil
}
return nil, fmt.Errorf("Error retrieving DynamoDB Global Table: %s", err)
}
return output.GlobalTableDescription, nil
}
func resourceAwsDynamoDbGlobalTableStateRefreshFunc(
d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
gtd, err := resourceAwsDynamoDbGlobalTableRetrieve(d, meta)
if err != nil {
log.Printf("Error on retrieving DynamoDB Global Table when waiting: %s", err)
return nil, "", err
}
if gtd == nil {
return nil, "", nil
}
if gtd.GlobalTableStatus != nil {
log.Printf("[DEBUG] Status for DynamoDB Global Table %s: %s", d.Id(), *gtd.GlobalTableStatus)
}
return gtd, *gtd.GlobalTableStatus, nil
}
}
func flattenAwsDynamoDbGlobalTable(d *schema.ResourceData, globalTableDescription *dynamodb.GlobalTableDescription) error {
var err error
d.Set("arn", globalTableDescription.GlobalTableArn)
d.Set("name", globalTableDescription.GlobalTableName)
err = d.Set("replica", flattenAwsDynamoDbReplicas(globalTableDescription.ReplicationGroup))
if err != nil {
return err
}
return nil
}
func expandAwsDynamoDbReplicaUpdateCreateReplicas(configuredReplicas []interface{}) []*dynamodb.ReplicaUpdate {
replicaUpdates := make([]*dynamodb.ReplicaUpdate, 0, len(configuredReplicas))
for _, replicaRaw := range configuredReplicas {
replica := replicaRaw.(map[string]interface{})
replicaUpdates = append(replicaUpdates, expandAwsDynamoDbReplicaUpdateCreateReplica(replica))
}
return replicaUpdates
}
func expandAwsDynamoDbReplicaUpdateCreateReplica(configuredReplica map[string]interface{}) *dynamodb.ReplicaUpdate {
replicaUpdate := &dynamodb.ReplicaUpdate{
Create: &dynamodb.CreateReplicaAction{
RegionName: aws.String(configuredReplica["region_name"].(string)),
},
}
return replicaUpdate
}
func expandAwsDynamoDbReplicaUpdateDeleteReplicas(configuredReplicas []interface{}) []*dynamodb.ReplicaUpdate {
replicaUpdates := make([]*dynamodb.ReplicaUpdate, 0, len(configuredReplicas))
for _, replicaRaw := range configuredReplicas {
replica := replicaRaw.(map[string]interface{})
replicaUpdates = append(replicaUpdates, expandAwsDynamoDbReplicaUpdateDeleteReplica(replica))
}
return replicaUpdates
}
func expandAwsDynamoDbReplicaUpdateDeleteReplica(configuredReplica map[string]interface{}) *dynamodb.ReplicaUpdate {
replicaUpdate := &dynamodb.ReplicaUpdate{
Delete: &dynamodb.DeleteReplicaAction{
RegionName: aws.String(configuredReplica["region_name"].(string)),
},
}
return replicaUpdate
}
func expandAwsDynamoDbReplicas(configuredReplicas []interface{}) []*dynamodb.Replica {
replicas := make([]*dynamodb.Replica, 0, len(configuredReplicas))
for _, replicaRaw := range configuredReplicas {
replica := replicaRaw.(map[string]interface{})
replicas = append(replicas, expandAwsDynamoDbReplica(replica))
}
return replicas
}
func expandAwsDynamoDbReplica(configuredReplica map[string]interface{}) *dynamodb.Replica {
replica := &dynamodb.Replica{
RegionName: aws.String(configuredReplica["region_name"].(string)),
}
return replica
}
func flattenAwsDynamoDbReplicas(replicaDescriptions []*dynamodb.ReplicaDescription) []interface{} {
replicas := []interface{}{}
for _, replicaDescription := range replicaDescriptions {
replicas = append(replicas, flattenAwsDynamoDbReplica(replicaDescription))
}
return replicas
}
func flattenAwsDynamoDbReplica(replicaDescription *dynamodb.ReplicaDescription) map[string]interface{} {
replica := make(map[string]interface{})
replica["region_name"] = *replicaDescription.RegionName
return replica
}

View File

@ -99,14 +99,20 @@ func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta int
}
if app == nil {
err = fmt.Errorf("Elastic Beanstalk Application %q not found", d.Id())
if d.IsNewResource() {
return resource.RetryableError(fmt.Errorf("Elastic Beanstalk Application %q not found.", d.Id()))
return resource.RetryableError(err)
}
return resource.NonRetryableError(err)
}
return nil
})
if err != nil {
if app == nil {
log.Printf("[WARN] %s, removing from state", err)
d.SetId("")
return nil
}
return err
}

View File

@ -245,6 +245,12 @@ func resourceAwsEMRCluster() *schema.Resource {
ForceNew: true,
Optional: true,
},
"custom_ami_id": {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
ValidateFunc: validateAwsEmrCustomAmiId,
},
},
}
}
@ -358,6 +364,10 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error
params.EbsRootVolumeSize = aws.Int64(int64(v.(int)))
}
if v, ok := d.GetOk("custom_ami_id"); ok {
params.CustomAmiId = aws.String(v.(string))
}
if instanceProfile != "" {
params.JobFlowRole = aws.String(instanceProfile)
}
@ -475,6 +485,10 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error {
d.Set("tags", tagsToMapEMR(cluster.Tags))
d.Set("ebs_root_volume_size", cluster.EbsRootVolumeSize)
if cluster.CustomAmiId != nil {
d.Set("custom_ami_id", cluster.CustomAmiId)
}
if err := d.Set("applications", flattenApplications(cluster.Applications)); err != nil {
log.Printf("[ERR] Error setting EMR Applications for cluster (%s): %s", d.Id(), err)
}

View File

@ -0,0 +1,187 @@
package aws
import (
"log"
"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 resourceAwsGameliftBuild() *schema.Resource {
return &schema.Resource{
Create: resourceAwsGameliftBuildCreate,
Read: resourceAwsGameliftBuildRead,
Update: resourceAwsGameliftBuildUpdate,
Delete: resourceAwsGameliftBuildDelete,
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringLenBetween(1, 1024),
},
"operating_system": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validateGameliftOperatingSystem,
},
"storage_location": {
Type: schema.TypeList,
Required: true,
ForceNew: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"bucket": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"key": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"role_arn": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validateArn,
},
},
},
},
"version": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringLenBetween(1, 1024),
},
},
}
}
func resourceAwsGameliftBuildCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).gameliftconn
sl := expandGameliftStorageLocation(d.Get("storage_location").([]interface{}))
input := gamelift.CreateBuildInput{
Name: aws.String(d.Get("name").(string)),
OperatingSystem: aws.String(d.Get("operating_system").(string)),
StorageLocation: sl,
}
if v, ok := d.GetOk("version"); ok {
input.Version = aws.String(v.(string))
}
log.Printf("[INFO] Creating Gamelift Build: %s", input)
var out *gamelift.CreateBuildOutput
err := resource.Retry(30*time.Second, func() *resource.RetryError {
var err error
out, err = conn.CreateBuild(&input)
if err != nil {
if isAWSErr(err, gamelift.ErrCodeInvalidRequestException, "Provided build is not accessible.") {
return resource.RetryableError(err)
}
return resource.NonRetryableError(err)
}
return nil
})
if err != nil {
return err
}
d.SetId(*out.Build.BuildId)
stateConf := resource.StateChangeConf{
Pending: []string{gamelift.BuildStatusInitialized},
Target: []string{gamelift.BuildStatusReady},
Timeout: 1 * time.Minute,
Refresh: func() (interface{}, string, error) {
out, err := conn.DescribeBuild(&gamelift.DescribeBuildInput{
BuildId: aws.String(d.Id()),
})
if err != nil {
return 42, "", err
}
return out, *out.Build.Status, nil
},
}
_, err = stateConf.WaitForState()
if err != nil {
return err
}
return resourceAwsGameliftBuildRead(d, meta)
}
func resourceAwsGameliftBuildRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).gameliftconn
log.Printf("[INFO] Reading Gamelift Build: %s", d.Id())
out, err := conn.DescribeBuild(&gamelift.DescribeBuildInput{
BuildId: aws.String(d.Id()),
})
if err != nil {
if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") {
log.Printf("[WARN] Gamelift Build (%s) not found, removing from state", d.Id())
d.SetId("")
return nil
}
return err
}
b := out.Build
d.Set("name", b.Name)
d.Set("operating_system", b.OperatingSystem)
d.Set("version", b.Version)
return nil
}
func resourceAwsGameliftBuildUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).gameliftconn
log.Printf("[INFO] Updating Gamelift Build: %s", d.Id())
input := gamelift.UpdateBuildInput{
BuildId: aws.String(d.Id()),
Name: aws.String(d.Get("name").(string)),
}
if v, ok := d.GetOk("version"); ok {
input.Version = aws.String(v.(string))
}
_, err := conn.UpdateBuild(&input)
if err != nil {
return err
}
return resourceAwsGameliftBuildRead(d, meta)
}
func resourceAwsGameliftBuildDelete(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).gameliftconn
log.Printf("[INFO] Deleting Gamelift Build: %s", d.Id())
_, err := conn.DeleteBuild(&gamelift.DeleteBuildInput{
BuildId: aws.String(d.Id()),
})
if err != nil {
return err
}
return nil
}
func expandGameliftStorageLocation(cfg []interface{}) *gamelift.S3Location {
loc := cfg[0].(map[string]interface{})
return &gamelift.S3Location{
Bucket: aws.String(loc["bucket"].(string)),
Key: aws.String(loc["key"].(string)),
RoleArn: aws.String(loc["role_arn"].(string)),
}
}

View File

@ -649,6 +649,10 @@ func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) e
if err != nil {
log.Printf("[DEBUG] Received error modifying Lambda Function Configuration %s: %s", d.Id(), err)
if isAWSErr(err, "InvalidParameterValueException", "The provided execution role does not have permissions") {
log.Printf("[DEBUG] Received %s, retrying UpdateFunctionConfiguration", err)
return resource.RetryableError(err)
}
if isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2, please make sure you have enough API rate limit.") {
log.Printf("[DEBUG] Received %s, retrying UpdateFunctionConfiguration", err)
return resource.RetryableError(err)

View File

@ -755,13 +755,22 @@ func resourceAwsRDSClusterDelete(d *schema.ResourceData, meta interface{}) error
}
log.Printf("[DEBUG] RDS Cluster delete options: %s", deleteOpts)
_, err := conn.DeleteDBCluster(&deleteOpts)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
if "InvalidDBClusterStateFault" == awsErr.Code() {
return fmt.Errorf("RDS Cluster cannot be deleted: %s", awsErr.Message())
err := resource.Retry(1*time.Minute, func() *resource.RetryError {
_, err := conn.DeleteDBCluster(&deleteOpts)
if err != nil {
if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") {
return resource.RetryableError(err)
}
if isAWSErr(err, rds.ErrCodeDBClusterNotFoundFault, "") {
return nil
}
return resource.NonRetryableError(err)
}
return nil
})
if err != nil {
return fmt.Errorf("RDS Cluster cannot be deleted: %s", err)
}
stateConf := &resource.StateChangeConf{

View File

@ -101,6 +101,9 @@ func resourceAwsRoute53Record() *schema.Resource {
Type: schema.TypeString,
Required: true,
StateFunc: normalizeAwsAliasName,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
return strings.ToLower(old) == strings.ToLower(new)
},
},
"evaluate_target_health": {
@ -898,11 +901,11 @@ func nilString(s string) *string {
func normalizeAwsAliasName(alias interface{}) string {
input := alias.(string)
if strings.HasPrefix(input, "dualstack.") {
return strings.Replace(input, "dualstack.", "", -1)
output := strings.ToLower(input)
if strings.HasPrefix(output, "dualstack.") {
output = strings.TrimLeft(output, "dualstack.")
}
return strings.TrimRight(input, ".")
return strings.TrimRight(output, ".")
}
func parseRecordId(id string) [4]string {

View File

@ -5,6 +5,7 @@ import (
"log"
"net/url"
"strconv"
"time"
"github.com/hashicorp/terraform/helper/schema"
@ -165,9 +166,9 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error {
attributes := make(map[string]*string)
resource := *resourceAwsSqsQueue()
queueResource := *resourceAwsSqsQueue()
for k, s := range resource.Schema {
for k, s := range queueResource.Schema {
if attrKey, ok := sqsQueueAttributeMap[k]; ok {
if value, ok := d.GetOk(k); ok {
switch s.Type {
@ -187,7 +188,18 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error {
req.Attributes = attributes
}
output, err := sqsconn.CreateQueue(req)
var output *sqs.CreateQueueOutput
err := resource.Retry(70*time.Second, func() *resource.RetryError {
var err error
output, err = sqsconn.CreateQueue(req)
if err != nil {
if isAWSErr(err, sqs.ErrCodeQueueDeletedRecently, "You must wait 60 seconds after deleting a queue before you can create another with the same name.") {
return resource.RetryableError(err)
}
return resource.NonRetryableError(err)
}
return nil
})
if err != nil {
return fmt.Errorf("Error creating SQS queue: %s", err)
}

View File

@ -19,6 +19,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/directoryservice"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ecs"
"github.com/aws/aws-sdk-go/service/elasticache"
@ -36,6 +37,7 @@ import (
"github.com/beevik/etree"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/structure"
"github.com/mitchellh/copystructure"
"gopkg.in/yaml.v2"
)
@ -3074,3 +3076,310 @@ func flattenMqBrokerInstances(instances []*mq.BrokerInstance) []interface{} {
return l
}
func diffDynamoDbGSI(oldGsi, newGsi []interface{}) (ops []*dynamodb.GlobalSecondaryIndexUpdate, e error) {
// Transform slices into maps
oldGsis := make(map[string]interface{})
for _, gsidata := range oldGsi {
m := gsidata.(map[string]interface{})
oldGsis[m["name"].(string)] = m
}
newGsis := make(map[string]interface{})
for _, gsidata := range newGsi {
m := gsidata.(map[string]interface{})
newGsis[m["name"].(string)] = m
}
for _, data := range newGsi {
newMap := data.(map[string]interface{})
newName := newMap["name"].(string)
if _, exists := oldGsis[newName]; !exists {
m := data.(map[string]interface{})
idxName := m["name"].(string)
ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{
Create: &dynamodb.CreateGlobalSecondaryIndexAction{
IndexName: aws.String(idxName),
KeySchema: expandDynamoDbKeySchema(m),
ProvisionedThroughput: expandDynamoDbProvisionedThroughput(m),
Projection: expandDynamoDbProjection(m),
},
})
}
}
for _, data := range oldGsi {
oldMap := data.(map[string]interface{})
oldName := oldMap["name"].(string)
newData, exists := newGsis[oldName]
if exists {
newMap := newData.(map[string]interface{})
idxName := newMap["name"].(string)
oldWriteCapacity, oldReadCapacity := oldMap["write_capacity"].(int), oldMap["read_capacity"].(int)
newWriteCapacity, newReadCapacity := newMap["write_capacity"].(int), newMap["read_capacity"].(int)
capacityChanged := (oldWriteCapacity != newWriteCapacity || oldReadCapacity != newReadCapacity)
oldAttributes, err := stripCapacityAttributes(oldMap)
if err != nil {
e = err
return
}
newAttributes, err := stripCapacityAttributes(newMap)
if err != nil {
e = err
return
}
otherAttributesChanged := !reflect.DeepEqual(oldAttributes, newAttributes)
if capacityChanged && !otherAttributesChanged {
update := &dynamodb.GlobalSecondaryIndexUpdate{
Update: &dynamodb.UpdateGlobalSecondaryIndexAction{
IndexName: aws.String(idxName),
ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap),
},
}
ops = append(ops, update)
} else if otherAttributesChanged {
// Other attributes cannot be updated
ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{
Delete: &dynamodb.DeleteGlobalSecondaryIndexAction{
IndexName: aws.String(idxName),
},
})
ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{
Create: &dynamodb.CreateGlobalSecondaryIndexAction{
IndexName: aws.String(idxName),
KeySchema: expandDynamoDbKeySchema(newMap),
ProvisionedThroughput: expandDynamoDbProvisionedThroughput(newMap),
Projection: expandDynamoDbProjection(newMap),
},
})
}
} else {
idxName := oldName
ops = append(ops, &dynamodb.GlobalSecondaryIndexUpdate{
Delete: &dynamodb.DeleteGlobalSecondaryIndexAction{
IndexName: aws.String(idxName),
},
})
}
}
return
}
func stripCapacityAttributes(in map[string]interface{}) (map[string]interface{}, error) {
mapCopy, err := copystructure.Copy(in)
if err != nil {
return nil, err
}
m := mapCopy.(map[string]interface{})
delete(m, "write_capacity")
delete(m, "read_capacity")
return m, nil
}
// Expanders + flatteners
func flattenDynamoDbTtl(ttlDesc *dynamodb.TimeToLiveDescription) []interface{} {
m := map[string]interface{}{}
if ttlDesc.AttributeName != nil {
m["attribute_name"] = *ttlDesc.AttributeName
if ttlDesc.TimeToLiveStatus != nil {
m["enabled"] = (*ttlDesc.TimeToLiveStatus == dynamodb.TimeToLiveStatusEnabled)
}
}
if len(m) > 0 {
return []interface{}{m}
}
return []interface{}{}
}
func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.TableDescription) error {
d.Set("write_capacity", table.ProvisionedThroughput.WriteCapacityUnits)
d.Set("read_capacity", table.ProvisionedThroughput.ReadCapacityUnits)
attributes := []interface{}{}
for _, attrdef := range table.AttributeDefinitions {
attribute := map[string]string{
"name": *attrdef.AttributeName,
"type": *attrdef.AttributeType,
}
attributes = append(attributes, attribute)
}
d.Set("attribute", attributes)
d.Set("name", table.TableName)
for _, attribute := range table.KeySchema {
if *attribute.KeyType == dynamodb.KeyTypeHash {
d.Set("hash_key", attribute.AttributeName)
}
if *attribute.KeyType == dynamodb.KeyTypeRange {
d.Set("range_key", attribute.AttributeName)
}
}
lsiList := make([]map[string]interface{}, 0, len(table.LocalSecondaryIndexes))
for _, lsiObject := range table.LocalSecondaryIndexes {
lsi := map[string]interface{}{
"name": *lsiObject.IndexName,
"projection_type": *lsiObject.Projection.ProjectionType,
}
for _, attribute := range lsiObject.KeySchema {
if *attribute.KeyType == dynamodb.KeyTypeRange {
lsi["range_key"] = *attribute.AttributeName
}
}
nkaList := make([]string, len(lsiObject.Projection.NonKeyAttributes))
for _, nka := range lsiObject.Projection.NonKeyAttributes {
nkaList = append(nkaList, *nka)
}
lsi["non_key_attributes"] = nkaList
lsiList = append(lsiList, lsi)
}
err := d.Set("local_secondary_index", lsiList)
if err != nil {
return err
}
gsiList := make([]map[string]interface{}, 0, len(table.GlobalSecondaryIndexes))
for _, gsiObject := range table.GlobalSecondaryIndexes {
gsi := map[string]interface{}{
"write_capacity": *gsiObject.ProvisionedThroughput.WriteCapacityUnits,
"read_capacity": *gsiObject.ProvisionedThroughput.ReadCapacityUnits,
"name": *gsiObject.IndexName,
}
for _, attribute := range gsiObject.KeySchema {
if *attribute.KeyType == dynamodb.KeyTypeHash {
gsi["hash_key"] = *attribute.AttributeName
}
if *attribute.KeyType == dynamodb.KeyTypeRange {
gsi["range_key"] = *attribute.AttributeName
}
}
gsi["projection_type"] = *(gsiObject.Projection.ProjectionType)
nonKeyAttrs := make([]string, 0, len(gsiObject.Projection.NonKeyAttributes))
for _, nonKeyAttr := range gsiObject.Projection.NonKeyAttributes {
nonKeyAttrs = append(nonKeyAttrs, *nonKeyAttr)
}
gsi["non_key_attributes"] = nonKeyAttrs
gsiList = append(gsiList, gsi)
}
if table.StreamSpecification != nil {
d.Set("stream_view_type", table.StreamSpecification.StreamViewType)
d.Set("stream_enabled", table.StreamSpecification.StreamEnabled)
d.Set("stream_arn", table.LatestStreamArn)
d.Set("stream_label", table.LatestStreamLabel)
}
err = d.Set("global_secondary_index", gsiList)
if err != nil {
return err
}
d.Set("arn", table.TableArn)
return nil
}
func expandDynamoDbAttributes(cfg []interface{}) []*dynamodb.AttributeDefinition {
attributes := make([]*dynamodb.AttributeDefinition, len(cfg), len(cfg))
for i, attribute := range cfg {
attr := attribute.(map[string]interface{})
attributes[i] = &dynamodb.AttributeDefinition{
AttributeName: aws.String(attr["name"].(string)),
AttributeType: aws.String(attr["type"].(string)),
}
}
return attributes
}
// TODO: Get rid of keySchemaM - the user should just explicitely define
// this in the config, we shouldn't magically be setting it like this.
// Removal will however require config change, hence BC. :/
func expandDynamoDbLocalSecondaryIndexes(cfg []interface{}, keySchemaM map[string]interface{}) []*dynamodb.LocalSecondaryIndex {
indexes := make([]*dynamodb.LocalSecondaryIndex, len(cfg), len(cfg))
for i, lsi := range cfg {
m := lsi.(map[string]interface{})
idxName := m["name"].(string)
// TODO: See https://github.com/terraform-providers/terraform-provider-aws/issues/3176
if _, ok := m["hash_key"]; !ok {
m["hash_key"] = keySchemaM["hash_key"]
}
indexes[i] = &dynamodb.LocalSecondaryIndex{
IndexName: aws.String(idxName),
KeySchema: expandDynamoDbKeySchema(m),
Projection: expandDynamoDbProjection(m),
}
}
return indexes
}
func expandDynamoDbGlobalSecondaryIndex(data map[string]interface{}) *dynamodb.GlobalSecondaryIndex {
return &dynamodb.GlobalSecondaryIndex{
IndexName: aws.String(data["name"].(string)),
KeySchema: expandDynamoDbKeySchema(data),
Projection: expandDynamoDbProjection(data),
ProvisionedThroughput: expandDynamoDbProvisionedThroughput(data),
}
}
func expandDynamoDbProvisionedThroughput(data map[string]interface{}) *dynamodb.ProvisionedThroughput {
return &dynamodb.ProvisionedThroughput{
WriteCapacityUnits: aws.Int64(int64(data["write_capacity"].(int))),
ReadCapacityUnits: aws.Int64(int64(data["read_capacity"].(int))),
}
}
func expandDynamoDbProjection(data map[string]interface{}) *dynamodb.Projection {
projection := &dynamodb.Projection{
ProjectionType: aws.String(data["projection_type"].(string)),
}
if v, ok := data["non_key_attributes"].([]interface{}); ok && len(v) > 0 {
projection.NonKeyAttributes = expandStringList(v)
}
return projection
}
func expandDynamoDbKeySchema(data map[string]interface{}) []*dynamodb.KeySchemaElement {
keySchema := []*dynamodb.KeySchemaElement{}
if v, ok := data["hash_key"]; ok && v != nil && v != "" {
keySchema = append(keySchema, &dynamodb.KeySchemaElement{
AttributeName: aws.String(v.(string)),
KeyType: aws.String(dynamodb.KeyTypeHash),
})
}
if v, ok := data["range_key"]; ok && v != nil && v != "" {
keySchema = append(keySchema, &dynamodb.KeySchemaElement{
AttributeName: aws.String(v.(string)),
KeyType: aws.String(dynamodb.KeyTypeRange),
})
}
return keySchema
}

View File

@ -333,53 +333,49 @@ func tagsFromMapDynamoDb(m map[string]interface{}) []*dynamodb.Tag {
// method from the ec2 tag resource handling. Also the `UntagResource` method
// for dynamoDB only requires a list of tag keys, instead of the full map of keys.
func setTagsDynamoDb(conn *dynamodb.DynamoDB, d *schema.ResourceData) error {
if d.HasChange("tags") {
arn := d.Get("arn").(string)
oraw, nraw := d.GetChange("tags")
o := oraw.(map[string]interface{})
n := nraw.(map[string]interface{})
create, remove := diffTagsDynamoDb(tagsFromMapDynamoDb(o), tagsFromMapDynamoDb(n))
arn := d.Get("arn").(string)
oraw, nraw := d.GetChange("tags")
o := oraw.(map[string]interface{})
n := nraw.(map[string]interface{})
create, remove := diffTagsDynamoDb(tagsFromMapDynamoDb(o), tagsFromMapDynamoDb(n))
// Set tags
if len(remove) > 0 {
err := resource.Retry(2*time.Minute, func() *resource.RetryError {
log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id())
_, err := conn.UntagResource(&dynamodb.UntagResourceInput{
ResourceArn: aws.String(arn),
TagKeys: remove,
})
if err != nil {
ec2err, ok := err.(awserr.Error)
if ok && strings.Contains(ec2err.Code(), "ResourceNotFoundException") {
return resource.RetryableError(err) // retry
}
return resource.NonRetryableError(err)
}
return nil
// Set tags
if len(remove) > 0 {
err := resource.Retry(2*time.Minute, func() *resource.RetryError {
log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id())
_, err := conn.UntagResource(&dynamodb.UntagResourceInput{
ResourceArn: aws.String(arn),
TagKeys: remove,
})
if err != nil {
return err
if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") {
return resource.RetryableError(err)
}
return resource.NonRetryableError(err)
}
return nil
})
if err != nil {
return err
}
if len(create) > 0 {
err := resource.Retry(2*time.Minute, func() *resource.RetryError {
log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id())
_, err := conn.TagResource(&dynamodb.TagResourceInput{
ResourceArn: aws.String(arn),
Tags: create,
})
if err != nil {
ec2err, ok := err.(awserr.Error)
if ok && strings.Contains(ec2err.Code(), "ResourceNotFoundException") {
return resource.RetryableError(err) // retry
}
return resource.NonRetryableError(err)
}
return nil
}
if len(create) > 0 {
err := resource.Retry(2*time.Minute, func() *resource.RetryError {
log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id())
_, err := conn.TagResource(&dynamodb.TagResourceInput{
ResourceArn: aws.String(arn),
Tags: create,
})
if err != nil {
return err
if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") {
return resource.RetryableError(err)
}
return resource.NonRetryableError(err)
}
return nil
})
if err != nil {
return err
}
}

View File

@ -9,8 +9,10 @@ import (
"time"
"github.com/aws/aws-sdk-go/service/apigateway"
"github.com/aws/aws-sdk-go/service/applicationautoscaling"
"github.com/aws/aws-sdk-go/service/cognitoidentity"
"github.com/aws/aws-sdk-go/service/cognitoidentityprovider"
"github.com/aws/aws-sdk-go/service/gamelift"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/structure"
@ -892,6 +894,19 @@ func validateAwsEcsPlacementConstraint(constType, constExpr string) error {
return nil
}
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateGlobalTable.html
func validateAwsDynamoDbGlobalTableName(v interface{}, k string) (ws []string, errors []error) {
value := v.(string)
if (len(value) > 255) || (len(value) < 3) {
errors = append(errors, fmt.Errorf("%s length must be between 3 and 255 characters: %q", k, value))
}
pattern := `^[a-zA-Z0-9_.-]+$`
if !regexp.MustCompile(pattern).MatchString(value) {
errors = append(errors, fmt.Errorf("%s must only include alphanumeric, underscore, period, or hyphen characters: %q", k, value))
}
return
}
// Validates that an Ecs placement strategy is set correctly
// Takes type, and field as strings
func validateAwsEcsPlacementStrategy(stratType, stratField string) error {
@ -948,6 +963,20 @@ func validateAwsEmrInstanceGroupRole(v interface{}, k string) (ws []string, erro
return
}
func validateAwsEmrCustomAmiId(v interface{}, k string) (ws []string, errors []error) {
value := v.(string)
if len(value) > 256 {
errors = append(errors, fmt.Errorf("%q cannot be longer than 256 characters", k))
}
if !regexp.MustCompile(`^ami\-[a-z0-9]+$`).MatchString(value) {
errors = append(errors, fmt.Errorf(
"%q must begin with 'ami-' and be comprised of only [a-z0-9]: %v", k, value))
}
return
}
func validateSfnActivityName(v interface{}, k string) (ws []string, errors []error) {
value := v.(string)
if len(value) > 80 {
@ -1125,8 +1154,16 @@ func validateAppautoscalingCustomizedMetricSpecificationStatistic(v interface{},
func validateAppautoscalingPredefinedMetricSpecification(v interface{}, k string) (ws []string, errors []error) {
validMetrics := []string{
"DynamoDBReadCapacityUtilization",
"DynamoDBWriteCapacityUtilization",
applicationautoscaling.MetricTypeAlbrequestCountPerTarget,
applicationautoscaling.MetricTypeDynamoDbreadCapacityUtilization,
applicationautoscaling.MetricTypeDynamoDbwriteCapacityUtilization,
applicationautoscaling.MetricTypeEc2spotFleetRequestAverageCpuutilization,
applicationautoscaling.MetricTypeEc2spotFleetRequestAverageNetworkIn,
applicationautoscaling.MetricTypeEc2spotFleetRequestAverageNetworkOut,
applicationautoscaling.MetricTypeEcsserviceAverageCpuutilization,
applicationautoscaling.MetricTypeEcsserviceAverageMemoryUtilization,
applicationautoscaling.MetricTypeRdsreaderAverageCpuutilization,
applicationautoscaling.MetricTypeRdsreaderAverageDatabaseConnections,
}
metric := v.(string)
for _, o := range validMetrics {
@ -2083,3 +2120,16 @@ func validateServiceDiscoveryServiceHealthCheckConfigType(v interface{}, k strin
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{
gamelift.OperatingSystemAmazonLinux: true,
gamelift.OperatingSystemWindows2012: true,
}
if !operatingSystems[value] {
errors = append(errors, fmt.Errorf("%q must be a valid operating system value: %q", k, value))
}
return
}

784
vendor/vendor.json vendored

File diff suppressed because it is too large Load Diff